# -*- coding: utf-8 -*- 
#
# Description:
#
#  Definiton
#
#
#
# Changes:
#
# 2012-01-10
# Initial Commit
#
#
# Copyright 2010-2012, WyDev Team.
# Author: Polo35 (polo35580@hotmail.fr)
#
# Licenced under Academic Free License version 3.0
# Review WyGui README & LICENSE files for further details.

nname: 0
n 0(None)[Thread.__init__(self)
self.dbus = dbus
self.user_stop = False
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76c958c>}
nname: 0
n 0(None)[self.stop()
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76c958c>}
nname: 0
n 0(None)[self.user_stop = True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76c954c>}
nname: 37
n 37(None)[]:
	i: 0(AL), 35()
	o: 

nname: 35
n 35(None)[]:
	i: 3(f), 18()
	o: 37()

nname: 18
n 18(None)[self.dbus.step()
]:
	i: 3(t)
	o: 35()

nname: 3
n 3(self.user_stop == False)[]:
	i: 0(loop)
	o: 18(t), 35(f)

nname: 0
n 0(None)[]:
	i: 
	o: 3(loop), 37(AL)

nname: 37
n 37(None)[]:
	i: 18()
	o: 

nname: 18
n 18(None)[	self.dbus.step()
]:
	i: 0(t)
	o: 37()

nname: 0
n 0(self.user_stop == False)[while self.user_stop == False:
]:
	i: 
	o: 18(t)

nname: 37
n 37(None)[]:
	i: 0()
	o: 

nname: 0
n 0(None)[while self.user_stop == False:
	self.dbus.step()
]:
	i: 
	o: 37()

nname: 0
n 0(None)[while self.user_stop == False:
	self.dbus.step()
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76c9bec>}
nname: 6
n 6(None)[def __init__(self, dbus):
	Thread.__init__(self)
	self.dbus = dbus
	self.user_stop = False

def __del__(self):
	self.stop()

def stop(self):
	self.user_stop = True

def run(self):
	while self.user_stop == False:
		self.dbus.step()

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb76c1fac>}
nname: 6
n 6(None)[]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb76c1d6c>}
nname: 167
n 167(None)[self.event_inst.signal('event_callback', 'ii', self._event_callback, WDB_AS_THREAD)
self.event_inst.signal('ready', '', self._ready, WDB_AS_THREAD)
self.ready_event = Event()
self._open = self.ref.method('open', '', 'i')
self._close = self.ref.method('close', '', 'i')
self._play = self.ref.method('play', '', 'i')
self._stop = self.ref.method('stop', '', 'i')
self._play_title = self.ref.method('play_title', 'i', 'i')
self._play_ptt = self.ref.method('play_ptt', 'ii', 'i')
self._get_number_of_title = self.ref.method('get_number_of_title', '', '(ii)')
self._get_number_of_ptt = self.ref.method('get_number_of_ptt', 'i', '(ii)')
self._get_volume_name = self.ref.method('get_volume_name', '', '(is)')
self._get_audio_stream = self.ref.method('get_audio_stream', '', '(ii)')
self._set_audio_stream = self.ref.method('set_audio_stream', 'i', 'i')
self._get_sub_stream = self.ref.method('get_sub_stream', '', '(ii)')
self._set_sub_stream = self.ref.method('set_sub_stream', 'ib', 'i')
self._pause = self.ref.method('pause', 'b', 'i')
self._set_speed = self.ref.method('set_speed', 'd', 'i')
self._set_trickmode = self.ref.method('set_trickmode', 'd', 'i')
self._get_speed = self.ref.method('get_speed', '', '(id)')
self._get_audio_info = self.ref.method('get_audio_info', 'i', '(iiiiiiiiiiiii)')
self._get_sub_info = self.ref.method('get_sub_info', 'i', '(iii)')
self._set_langage = self.ref.method('set_langage', 'iiii', 'i')
self._select_menu = self.ref.method('select_menu', 'i', 'i')
self._get_available_stream = self.ref.method('get_available_stream', '', '(iii)')
self._action_button = self.ref.method('action_button', 'ii', 'i')
self._get_button_info = self.ref.method('get_button_info', '', '(iiii)')
self._set_display_mode = self.ref.method('set_display_mode', 'i', 'i')
self._get_display_mode = self.ref.method('get_display_mode', '', '(ii)')
self._get_ptt_location = self.ref.method('get_ptt_location', '', '(iiiii)')
self._get_title_location = self.ref.method('get_title_location', '', '(iiiii)')
self._get_ptt_duration = self.ref.method('get_ptt_duration', '', '(iiiii)')
self._get_title_duration = self.ref.method('get_title_duration', '', '(iiiii)')
self._set_menu_langage = self.ref.method('set_menu_langage', 'i', 'i')
self._next_chapter = self.ref.method('next_chapter', '', 'i')
self._previous_chapter = self.ref.method('previous_chapter', '', 'i')
self._get_player_mode = self.ref.method('get_player_mode', '', '(ii)')
self._check_menu_available = self.ref.method('check_menu_available', 'i', '(ii)')
self._resume = self.ref.method('resume', '', 'i')
self._set_parental_level = self.ref.method('set_parental_level', 'i', 'i')
self._set_parental_country = self.ref.method('set_parental_country', 'i', 'i')
self._get_parental_info = self.ref.method('get_parental_info', '', '(iiii)')
self._time_play = self.ref.method('time_play', 'iiii', 'i')
self._time_search = self.ref.method('time_search', 'iii', 'i')
self._set_angle = self.ref.method('set_angle', 'i', 'i')
self._get_number_of_angle = self.ref.method('get_number_of_angle', 'i', '(ii)')
self._get_current_angle = self.ref.method('get_current_angle', '', '(ii)')
self._set_video_output = self.ref.method('set_video_output', 'i', 'i')
self._is_sub_enabled = self.ref.method('is_sub_enabled', '', '(ii)')
self._seek_percent = self.ref.method('seek_percent', 'ii', 'i')
self._set_breakpoint = self.ref.method('set_breakpoint', 'i', 'i')
self._set_surround = self.ref.method('set_surround', 'i', 'i')
self.domain = self._domain_type[0]
self.cur_title = 0
self.cur_ptt = 0
self._test = self.ref.method('test', '', 'i')
return None
]:
	i: 24(), 91()
	o: 

nname: 91
n 91(None)[self.wdb_client = WyDbus('com.wyplay.wyplay_client', system=True)
self.ref = self.wdb_client.reference(self._dbus_name, self._dbus_path)
self.event_inst = self.wdb_client.instance(self._dbus_path)
]:
	i: 0(f)
	o: 167()

nname: 24
n 24(None)[self.wdb = dbus
self.ref = self.wdb.reference(self._dbus_name, self._dbus_path)
self.event_inst = self.wdb.instance(self._dbus_path)
]:
	i: 0(t)
	o: 167()

nname: 0
n 0(dbus)[self._client_callback = None
self._iso = False
]:
	i: 
	o: 24(t), 91(f)

nname: 0
n 0(None)[self._client_callback = None
self._iso = False
if dbus:
	self.wdb = dbus
	self.ref = self.wdb.reference(self._dbus_name, self._dbus_path)
	self.event_inst = self.wdb.instance(self._dbus_path)
else:
	self.wdb_client = WyDbus('com.wyplay.wyplay_client', system=True)
	self.ref = self.wdb_client.reference(self._dbus_name, self._dbus_path)
	self.event_inst = self.wdb_client.instance(self._dbus_path)
self.event_inst.signal('event_callback', 'ii', self._event_callback, WDB_AS_THREAD)
self.event_inst.signal('ready', '', self._ready, WDB_AS_THREAD)
self.ready_event = Event()
self._open = self.ref.method('open', '', 'i')
self._close = self.ref.method('close', '', 'i')
self._play = self.ref.method('play', '', 'i')
self._stop = self.ref.method('stop', '', 'i')
self._play_title = self.ref.method('play_title', 'i', 'i')
self._play_ptt = self.ref.method('play_ptt', 'ii', 'i')
self._get_number_of_title = self.ref.method('get_number_of_title', '', '(ii)')
self._get_number_of_ptt = self.ref.method('get_number_of_ptt', 'i', '(ii)')
self._get_volume_name = self.ref.method('get_volume_name', '', '(is)')
self._get_audio_stream = self.ref.method('get_audio_stream', '', '(ii)')
self._set_audio_stream = self.ref.method('set_audio_stream', 'i', 'i')
self._get_sub_stream = self.ref.method('get_sub_stream', '', '(ii)')
self._set_sub_stream = self.ref.method('set_sub_stream', 'ib', 'i')
self._pause = self.ref.method('pause', 'b', 'i')
self._set_speed = self.ref.method('set_speed', 'd', 'i')
self._set_trickmode = self.ref.method('set_trickmode', 'd', 'i')
self._get_speed = self.ref.method('get_speed', '', '(id)')
self._get_audio_info = self.ref.method('get_audio_info', 'i', '(iiiiiiiiiiiii)')
self._get_sub_info = self.ref.method('get_sub_info', 'i', '(iii)')
self._set_langage = self.ref.method('set_langage', 'iiii', 'i')
self._select_menu = self.ref.method('select_menu', 'i', 'i')
self._get_available_stream = self.ref.method('get_available_stream', '', '(iii)')
self._action_button = self.ref.method('action_button', 'ii', 'i')
self._get_button_info = self.ref.method('get_button_info', '', '(iiii)')
self._set_display_mode = self.ref.method('set_display_mode', 'i', 'i')
self._get_display_mode = self.ref.method('get_display_mode', '', '(ii)')
self._get_ptt_location = self.ref.method('get_ptt_location', '', '(iiiii)')
self._get_title_location = self.ref.method('get_title_location', '', '(iiiii)')
self._get_ptt_duration = self.ref.method('get_ptt_duration', '', '(iiiii)')
self._get_title_duration = self.ref.method('get_title_duration', '', '(iiiii)')
self._set_menu_langage = self.ref.method('set_menu_langage', 'i', 'i')
self._next_chapter = self.ref.method('next_chapter', '', 'i')
self._previous_chapter = self.ref.method('previous_chapter', '', 'i')
self._get_player_mode = self.ref.method('get_player_mode', '', '(ii)')
self._check_menu_available = self.ref.method('check_menu_available', 'i', '(ii)')
self._resume = self.ref.method('resume', '', 'i')
self._set_parental_level = self.ref.method('set_parental_level', 'i', 'i')
self._set_parental_country = self.ref.method('set_parental_country', 'i', 'i')
self._get_parental_info = self.ref.method('get_parental_info', '', '(iiii)')
self._time_play = self.ref.method('time_play', 'iiii', 'i')
self._time_search = self.ref.method('time_search', 'iii', 'i')
self._set_angle = self.ref.method('set_angle', 'i', 'i')
self._get_number_of_angle = self.ref.method('get_number_of_angle', 'i', '(ii)')
self._get_current_angle = self.ref.method('get_current_angle', '', '(ii)')
self._set_video_output = self.ref.method('set_video_output', 'i', 'i')
self._is_sub_enabled = self.ref.method('is_sub_enabled', '', '(ii)')
self._seek_percent = self.ref.method('seek_percent', 'ii', 'i')
self._set_breakpoint = self.ref.method('set_breakpoint', 'i', 'i')
self._set_surround = self.ref.method('set_surround', 'i', 'i')
self.domain = self._domain_type[0]
self.cur_title = 0
self.cur_ptt = 0
self._test = self.ref.method('test', '', 'i')
return None
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb767c0ec>}
nname: 318
n 318(None)[return (change_type, change_val)
]:
	i: 272(), 286(), 316(AE)
	o: 

nname: 316
n 316(None)[]:
	i: 276(f)
	o: 318(AE)

nname: 286
n 286(None)[#, e
print 'error in wss management :',
print e
change_val = 0
change_type = 0
]:
	i: 276(t)
	o: 318()

nname: 276
n 276(<dummy_ex3> EXC_MATCH Exection)[]:
	i: 0(except)
	o: 286(t), 316(f)

nname: 272
n 272(None)[]:
	i: 52(), 74(), 104(), 134(), 164(), 194(), 224(), 254(), 271()
	o: 318()

nname: 271
n 271(None)[]:
	i: 241(f)
	o: 272()

nname: 254
n 254(None)[change_val = self._video_sub_mode[change_val]
]:
	i: 241(t)
	o: 272()

nname: 241
n 241(change_type == 'DCAWC_SUBTITLING_MODE')[]:
	i: 211(f)
	o: 254(t), 271(f)

nname: 224
n 224(None)[change_val = self._video_film_camera_mode[change_val]
]:
	i: 211(t)
	o: 272()

nname: 211
n 211(change_type == 'DCAWC_FILM_CAMERA_MODE')[]:
	i: 181(f)
	o: 224(t), 241(f)

nname: 194
n 194(None)[change_val = self._video_presentation_mode[change_val]
]:
	i: 181(t)
	o: 272()

nname: 181
n 181(change_type == 'DCAWC_WSS_ASPECT_RATIO')[]:
	i: 151(f)
	o: 194(t), 211(f)

nname: 164
n 164(None)[change_val = self._display_mode_get[change_val]
]:
	i: 151(t)
	o: 272()

nname: 151
n 151(change_type == 'DCAWC_MPEG_PRESENTATION_MODE')[]:
	i: 121(f)
	o: 164(t), 181(f)

nname: 134
n 134(None)[change_val = self._video_analog_source_mode[change_val]
]:
	i: 121(t)
	o: 272()

nname: 121
n 121(change_type == 'DCAWC_ANALOGUE_SOURCE_MODE')[]:
	i: 91(f)
	o: 134(t), 151(f)

nname: 104
n 104(None)[change_val = self._copy_protection[change_val]
]:
	i: 91(t)
	o: 272()

nname: 91
n 91(change_type == 'DCAWC_COPY_PROTECTION')[]:
	i: 61(f)
	o: 104(t), 121(f)

nname: 74
n 74(None)[change_val = self._copy_mode[change_val]
]:
	i: 61(t)
	o: 272()

nname: 61
n 61(change_type == 'DCAWC_COPY_MODE')[]:
	i: 3(f)
	o: 74(t), 91(f)

nname: 52
n 52(None)[print 'DCAWC_NONE'
]:
	i: 3(t)
	o: 272()

nname: 3
n 3(change_type == 'DCAWC_NONE')[change_type = (param & 4278190080L) >> 24
change_val = param & 16777215
change_type = self._wss_change_type[change_type]
]:
	i: 0(try)
	o: 52(t), 61(f)

nname: 0
n 0(None)[]:
	i: 
	o: 3(try), 276(except)

nname: 318
n 318(None)[return (change_type, change_val)
]:
	i: 276(), 0()
	o: 

nname: 276
n 276(None)[except Exection, e:
	print 'error in wss management :',
	print e
	change_val = 0
	change_type = 0
]:
	i: 0()
	o: 318()

nname: 318
n 318(None)[return (change_type, change_val)
]:
	i: 276(), 0()
	o: 

nname: 0
n 0(None)[try:
	change_type = (param & 4278190080L) >> 24
	change_val = param & 16777215
	change_type = self._wss_change_type[change_type]
	if change_type == 'DCAWC_NONE':
		print 'DCAWC_NONE'
	else:
		if change_type == 'DCAWC_COPY_MODE':
			change_val = self._copy_mode[change_val]
		else:
			if change_type == 'DCAWC_COPY_PROTECTION':
				change_val = self._copy_protection[change_val]
			else:
				if change_type == 'DCAWC_ANALOGUE_SOURCE_MODE':
					change_val = self._video_analog_source_mode[change_val]
				else:
					if change_type == 'DCAWC_MPEG_PRESENTATION_MODE':
						change_val = self._display_mode_get[change_val]
					else:
						if change_type == 'DCAWC_WSS_ASPECT_RATIO':
							change_val = self._video_presentation_mode[change_val]
						else:
							if change_type == 'DCAWC_FILM_CAMERA_MODE':
								change_val = self._video_film_camera_mode[change_val]
							else:
								if change_type == 'DCAWC_SUBTITLING_MODE':
									change_val = self._video_sub_mode[change_val]
]:
	i: 
	o: 318(), 276()

self.nodes: {0: <unpyclib.structure.node instance at 0xb76dceac>, 276: <unpyclib.structure.node instance at 0xb766d6ec>, 318: <unpyclib.structure.node instance at 0xb76e2a8c>}
nname: 504
n 504(None)[return None
]:
	i: 486(), 503()
	o: 

nname: 503
n 503(None)[]:
	i: 471(f)
	o: 504()

nname: 486
n 486(None)[self._client_callback(event)
]:
	i: 471(t)
	o: 504()

nname: 471
n 471(self._client_callback != None)[]:
	i: 53(JA), 74(JA), 98(), 122(JA), 159(JA), 199(), 219(), 259(), 303(JA), 324(JA), 348(), 372(JA), 393(JA), 417(), 437(), 470()
	o: 486(t), 503(f)

nname: 470
n 470(None)[]:
	i: 420(f)
	o: 471()

nname: 437
n 437(None)[event['param'], event['value'] = self._wss_management(param)
]:
	i: 420(t)
	o: 471()

nname: 420
n 420(event['type'] == 'WYDVD_CGMS_APS_WSS_CHANGE')[]:
	i: 351(f)
	o: 437(t), 470(f)

nname: 393
n 393(None)[event['param'] = self._video_mode_get[0]
]:
	i: 368(except)
	o: 471(JA)

nname: 372
n 372(None)[event['param'] = self._video_mode_get[param]
]:
	i: 368(try)
	o: 471(JA)

nname: 368
n 368(None)[]:
	i: 351(t)
	o: 372(try), 393(except)

nname: 351
n 351(event['type'] == 'WYDVD_VIDEO_STANDARD_CHANGE')[]:
	i: 282(f)
	o: 368(t), 420(f)

nname: 324
n 324(None)[event['param'] = self._display_mode_get[0]
]:
	i: 299(except)
	o: 471(JA)

nname: 303
n 303(None)[event['param'] = self._display_mode_get[param]
]:
	i: 299(try)
	o: 471(JA)

nname: 299
n 299(None)[]:
	i: 282(t)
	o: 303(try), 324(except)

nname: 282
n 282(event['type'] == 'WYDVD_DISPLAY_MODE_CHANGE')[]:
	i: 242(f)
	o: 299(t), 351(f)

nname: 259
n 259(None)[event['param'] = param
self.cur_ptt = param
]:
	i: 242(t)
	o: 471()

nname: 242
n 242(event['type'] == 'WYDVD_PART_OF_TITLE_CHANGE')[]:
	i: 202(f)
	o: 259(t), 282(f)

nname: 219
n 219(None)[event['param'] = param
self.cur_title = param
]:
	i: 202(t)
	o: 471()

nname: 202
n 202(event['type'] == 'WYDVD_TITLE_CHANGE')[]:
	i: 101(f)
	o: 219(t), 242(f)

nname: 159
n 159(None)[event['param'] = self._domain_type[0]
self.domain = self._domain_type[0]
]:
	i: 118(except)
	o: 471(JA)

nname: 122
n 122(None)[event['param'] = self._domain_type[param]
self.domain = self._domain_type[param]
]:
	i: 118(try)
	o: 471(JA)

nname: 118
n 118(None)[]:
	i: 101(t)
	o: 122(try), 159(except)

nname: 101
n 101(event['type'] == 'WYDVD_DOMAIN_CHANGE')[]:
	i: 0(f)
	o: 118(t), 202(f)

nname: 74
n 74(None)[event['param'] = self._player_mode[0]
]:
	i: 49(except)
	o: 471(JA)

nname: 53
n 53(None)[event['param'] = self._player_mode[param]
]:
	i: 49(try)
	o: 471(JA)

nname: 49
n 49(None)[]:
	i: 0(t)
	o: 53(try), 74(except)

nname: 0
n 0(event['type'] == 'WYDVD_PLAYBACK_MODE_CHANGE')[event = {}
event['type'] = self._event_type[type]
event['param'] = param
]:
	i: 
	o: 49(t), 101(f)

nname: 471
n 471(None)[if self._client_callback != None:
	self._client_callback(event)
return None
]:
	i: 74(JA), 98(), 159(JA), 199(), 219(), 259(), 324(JA), 348(), 393(JA), 417(), 420()
	o: 

nname: 420
n 420(None)[if event['type'] == 'WYDVD_CGMS_APS_WSS_CHANGE':
	event['param'], event['value'] = self._wss_management(param)
]:
	i: 351(f)
	o: 471()

nname: 393
n 393(None)[except:
	event['param'] = self._video_mode_get[0]
]:
	i: 368()
	o: 471(JA)

nname: 368
n 368(None)[try:
	event['param'] = self._video_mode_get[param]
]:
	i: 351(t)
	o: 393()

nname: 351
n 351(event['type'] == 'WYDVD_VIDEO_STANDARD_CHANGE')[]:
	i: 282(f)
	o: 368(t), 420(f)

nname: 324
n 324(None)[except:
	event['param'] = self._display_mode_get[0]
]:
	i: 299()
	o: 471(JA)

nname: 299
n 299(None)[try:
	event['param'] = self._display_mode_get[param]
]:
	i: 282(t)
	o: 324()

nname: 282
n 282(event['type'] == 'WYDVD_DISPLAY_MODE_CHANGE')[]:
	i: 242(f)
	o: 299(t), 351(f)

nname: 259
n 259(None)[event['param'] = param
self.cur_ptt = param
]:
	i: 242(t)
	o: 471()

nname: 242
n 242(event['type'] == 'WYDVD_PART_OF_TITLE_CHANGE')[]:
	i: 202(f)
	o: 259(t), 282(f)

nname: 219
n 219(None)[event['param'] = param
self.cur_title = param
]:
	i: 202(t)
	o: 471()

nname: 202
n 202(event['type'] == 'WYDVD_TITLE_CHANGE')[]:
	i: 101(f)
	o: 219(t), 242(f)

nname: 159
n 159(None)[except:
	event['param'] = self._domain_type[0]
	self.domain = self._domain_type[0]
]:
	i: 118()
	o: 471(JA)

nname: 118
n 118(None)[try:
	event['param'] = self._domain_type[param]
	self.domain = self._domain_type[param]
]:
	i: 101(t)
	o: 159()

nname: 101
n 101(event['type'] == 'WYDVD_DOMAIN_CHANGE')[]:
	i: 0(f)
	o: 118(t), 202(f)

nname: 74
n 74(None)[except:
	event['param'] = self._player_mode[0]
]:
	i: 49()
	o: 471(JA)

nname: 49
n 49(None)[try:
	event['param'] = self._player_mode[param]
]:
	i: 0(t)
	o: 74()

nname: 0
n 0(event['type'] == 'WYDVD_PLAYBACK_MODE_CHANGE')[event = {}
event['type'] = self._event_type[type]
event['param'] = param
]:
	i: 
	o: 49(t), 101(f)

nname: 471
n 471(None)[if self._client_callback != None:
	self._client_callback(event)
return None
]:
	i: 49(JA), 98(), 118(JA), 199(), 219(), 259(), 299(JA), 348(), 368(JA), 417(), 420()
	o: 

nname: 420
n 420(None)[if event['type'] == 'WYDVD_CGMS_APS_WSS_CHANGE':
	event['param'], event['value'] = self._wss_management(param)
]:
	i: 351(f)
	o: 471()

nname: 368
n 368(None)[try:
	event['param'] = self._video_mode_get[param]
except:
	event['param'] = self._video_mode_get[0]
]:
	i: 351(t)
	o: 471(JA)

nname: 351
n 351(event['type'] == 'WYDVD_VIDEO_STANDARD_CHANGE')[]:
	i: 282(f)
	o: 368(t), 420(f)

nname: 299
n 299(None)[try:
	event['param'] = self._display_mode_get[param]
except:
	event['param'] = self._display_mode_get[0]
]:
	i: 282(t)
	o: 471(JA)

nname: 282
n 282(event['type'] == 'WYDVD_DISPLAY_MODE_CHANGE')[]:
	i: 242(f)
	o: 299(t), 351(f)

nname: 259
n 259(None)[event['param'] = param
self.cur_ptt = param
]:
	i: 242(t)
	o: 471()

nname: 242
n 242(event['type'] == 'WYDVD_PART_OF_TITLE_CHANGE')[]:
	i: 202(f)
	o: 259(t), 282(f)

nname: 219
n 219(None)[event['param'] = param
self.cur_title = param
]:
	i: 202(t)
	o: 471()

nname: 202
n 202(event['type'] == 'WYDVD_TITLE_CHANGE')[]:
	i: 101(f)
	o: 219(t), 242(f)

nname: 118
n 118(None)[try:
	event['param'] = self._domain_type[param]
	self.domain = self._domain_type[param]
except:
	event['param'] = self._domain_type[0]
	self.domain = self._domain_type[0]
]:
	i: 101(t)
	o: 471(JA)

nname: 101
n 101(event['type'] == 'WYDVD_DOMAIN_CHANGE')[]:
	i: 0(f)
	o: 118(t), 202(f)

nname: 49
n 49(None)[try:
	event['param'] = self._player_mode[param]
except:
	event['param'] = self._player_mode[0]
]:
	i: 0(t)
	o: 471(JA)

nname: 0
n 0(event['type'] == 'WYDVD_PLAYBACK_MODE_CHANGE')[event = {}
event['type'] = self._event_type[type]
event['param'] = param
]:
	i: 
	o: 49(t), 101(f)

nname: 471
n 471(None)[if self._client_callback != None:
	self._client_callback(event)
return None
]:
	i: 0(JA), 98(), 199(), 348(), 417()
	o: 

nname: 0
n 0(None)[event = {}
event['type'] = self._event_type[type]
event['param'] = param
if event['type'] == 'WYDVD_PLAYBACK_MODE_CHANGE':
	try:
		event['param'] = self._player_mode[param]
	except:
		event['param'] = self._player_mode[0]
else:
	if event['type'] == 'WYDVD_DOMAIN_CHANGE':
		try:
			event['param'] = self._domain_type[param]
			self.domain = self._domain_type[param]
		except:
			event['param'] = self._domain_type[0]
			self.domain = self._domain_type[0]
	else:
		if event['type'] == 'WYDVD_TITLE_CHANGE':
			event['param'] = param
			self.cur_title = param
		else:
			if event['type'] == 'WYDVD_PART_OF_TITLE_CHANGE':
				event['param'] = param
				self.cur_ptt = param
			else:
				if event['type'] == 'WYDVD_DISPLAY_MODE_CHANGE':
					try:
						event['param'] = self._display_mode_get[param]
					except:
						event['param'] = self._display_mode_get[0]
				else:
					if event['type'] == 'WYDVD_VIDEO_STANDARD_CHANGE':
						try:
							event['param'] = self._video_mode_get[param]
						except:
							event['param'] = self._video_mode_get[0]
					else:
						if event['type'] == 'WYDVD_CGMS_APS_WSS_CHANGE':
							event['param'], event['value'] = self._wss_management(param)
]:
	i: 
	o: 471(JA)

self.nodes: {0: <unpyclib.structure.node instance at 0xb766d42c>, 416: <unpyclib.structure.node instance at 0xb7677a2c>, 417: <unpyclib.structure.node instance at 0xb767750c>, 198: <unpyclib.structure.node instance at 0xb76777cc>, 199: <unpyclib.structure.node instance at 0xb767762c>, 471: <unpyclib.structure.node instance at 0xb766da4c>, 347: <unpyclib.structure.node instance at 0xb767730c>, 348: <unpyclib.structure.node instance at 0xb76776cc>, 97: <unpyclib.structure.node instance at 0xb767718c>, 98: <unpyclib.structure.node instance at 0xb767712c>}
nname: 0
n 0(None)[self.ready_event.set()
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664d6c>}
nname: 0
n 0(None)[self._client_callback = callback
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664d8c>}
nname: 0
n 0(None)[self._client_callback = None
return None
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664d2c>}
nname: 0
n 0(None)[self.dbus_thread.stop()
self.dbus_thread.join()
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664e6c>}
nname: 42
n 42(None)[]:
	i: 12(), 41()
	o: 

nname: 41
n 41(None)[]:
	i: 0(f)
	o: 42()

nname: 12
n 12(None)[raise WydvdException('wydvd', self._wydvd_error[res], res)
]:
	i: 0(t)
	o: 42()

nname: 0
n 0(res != 0)[]:
	i: 
	o: 12(t), 41(f)

nname: 0
n 0(None)[if res != 0:
	raise WydvdException('wydvd', self._wydvd_error[res], res)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664e8c>}
nname: 96
n 96(None)[]:
	i: 53(), 70()
	o: 

nname: 70
n 70(None)[self._check_error(ret[0])
return ret[1:]
]:
	i: 38(f)
	o: 96()

nname: 53
n 53(None)[self._check_error(ret)
]:
	i: 38(t)
	o: 96()

nname: 38
n 38(isinstance(ret, int))[]:
	i: 3(), 19(), 37(AE)
	o: 53(t), 70(f)

nname: 19
n 19(None)[raise WydvdException('call')
]:
	i: 0(except)
	o: 38()

nname: 3
n 3(None)[ret = func(*args)
]:
	i: 0(try)
	o: 38()

nname: 0
n 0(None)[]:
	i: 
	o: 3(try), 19(except)

nname: 96
n 96(None)[]:
	i: 19()
	o: 

nname: 19
n 19(None)[except:
	raise WydvdException('call')
if isinstance(ret, int):
	self._check_error(ret)
else:
	self._check_error(ret[0])
	return ret[1:]
]:
	i: 0()
	o: 96()

nname: 0
n 0(None)[try:
	ret = func(*args)
]:
	i: 
	o: 19()

nname: 96
n 96(None)[]:
	i: 0()
	o: 

nname: 0
n 0(None)[try:
	ret = func(*args)
except:
	raise WydvdException('call')
if isinstance(ret, int):
	self._check_error(ret)
else:
	self._check_error(ret[0])
	return ret[1:]
]:
	i: 
	o: 96()

nname: 0
n 0(None)[try:
	ret = func(*args)
except:
	raise WydvdException('call')
if isinstance(ret, int):
	self._check_error(ret)
else:
	self._check_error(ret[0])
	return ret[1:]
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76dc10c>}
nname: 307
n 307(None)[]:
	i: 261(), 294()
	o: 

nname: 294
n 294(None)[raise WydvdException('Error Open')
]:
	i: 230(f)
	o: 307()

nname: 261
n 261(None)[self._call(self._open)
self.ready_event.clear()
]:
	i: 230(t)
	o: 307()

nname: 230
n 230(self.ready_event.isSet())[self.ready_event.wait(15)
]:
	i: 26(), 181()
	o: 261(t), 294(f)

nname: 181
n 181(None)[os.waitpid(_pre_process.pid, 0)
self._reader = Popen(['wydvd', 'iso'])
self._iso = True
]:
	i: 91(), 153()
	o: 230()

nname: 153
n 153(None)[_pre_process = Popen(['ln', '-sf', ss[1], '/dev/loop0'])
]:
	i: 136(), 152()
	o: 181()

nname: 152
n 152(None)[]:
	i: 119(f)
	o: 153()

nname: 136
n 136(None)[raise WydvdException('Unsupported URI type')
]:
	i: 119(t)
	o: 153()

nname: 119
n 119(ss[0] != 'file')[]:
	i: 57(f)
	o: 136(t), 152(f)

nname: 91
n 91(None)[_pre_process = Popen(['ln', '-sf', path, '/dev/loop0'])
]:
	i: 57(t)
	o: 181()

nname: 57
n 57(len(ss) == 1)[ss = path.split('://')
]:
	i: 0(t)
	o: 91(t), 119(f)

nname: 26
n 26(None)[self._reader = Popen(['wydvd'])
self._iso = False
]:
	i: 0(f)
	o: 230()

nname: 0
n 0(path)[path = urllib.unquote(path)
print path
]:
	i: 
	o: 26(f), 57(t)

nname: 230
n 230(None)[self.ready_event.wait(15)
if self.ready_event.isSet():
	self._call(self._open)
	self.ready_event.clear()
else:
	raise WydvdException('Error Open')
]:
	i: 26(), 181()
	o: 

nname: 181
n 181(None)[os.waitpid(_pre_process.pid, 0)
self._reader = Popen(['wydvd', 'iso'])
self._iso = True
]:
	i: 91(), 119()
	o: 230()

nname: 119
n 119(None)[if ss[0] != 'file':
	raise WydvdException('Unsupported URI type')
_pre_process = Popen(['ln', '-sf', ss[1], '/dev/loop0'])
]:
	i: 57(f)
	o: 181()

nname: 91
n 91(None)[_pre_process = Popen(['ln', '-sf', path, '/dev/loop0'])
]:
	i: 57(t)
	o: 181()

nname: 57
n 57(len(ss) == 1)[ss = path.split('://')
]:
	i: 0(t)
	o: 91(t), 119(f)

nname: 26
n 26(None)[self._reader = Popen(['wydvd'])
self._iso = False
]:
	i: 0(f)
	o: 230()

nname: 0
n 0(path)[path = urllib.unquote(path)
print path
]:
	i: 
	o: 26(f), 57(t)

nname: 230
n 230(None)[self.ready_event.wait(15)
if self.ready_event.isSet():
	self._call(self._open)
	self.ready_event.clear()
else:
	raise WydvdException('Error Open')
]:
	i: 26(), 57()
	o: 

nname: 57
n 57(None)[ss = path.split('://')
if len(ss) == 1:
	_pre_process = Popen(['ln', '-sf', path, '/dev/loop0'])
else:
	if ss[0] != 'file':
		raise WydvdException('Unsupported URI type')
	_pre_process = Popen(['ln', '-sf', ss[1], '/dev/loop0'])
os.waitpid(_pre_process.pid, 0)
self._reader = Popen(['wydvd', 'iso'])
self._iso = True
]:
	i: 0(t)
	o: 230()

nname: 26
n 26(None)[self._reader = Popen(['wydvd'])
self._iso = False
]:
	i: 0(f)
	o: 230()

nname: 0
n 0(path)[path = urllib.unquote(path)
print path
]:
	i: 
	o: 26(f), 57(t)

nname: 0
n 0(None)[path = urllib.unquote(path)
print path
if not path:
	self._reader = Popen(['wydvd'])
	self._iso = False
else:
	ss = path.split('://')
	if len(ss) == 1:
		_pre_process = Popen(['ln', '-sf', path, '/dev/loop0'])
	else:
		if ss[0] != 'file':
			raise WydvdException('Unsupported URI type')
		_pre_process = Popen(['ln', '-sf', ss[1], '/dev/loop0'])
	os.waitpid(_pre_process.pid, 0)
	self._reader = Popen(['wydvd', 'iso'])
	self._iso = True
self.ready_event.wait(15)
if self.ready_event.isSet():
	self._call(self._open)
	self.ready_event.clear()
else:
	raise WydvdException('Error Open')
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76c926c>}
nname: 0
n 0(None)[os.system('kill ' + str(self._reader.pid))
os.waitpid(self._reader.pid, 0)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664f0c>}
nname: 0
n 0(None)[self._call(self._open)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664dac>}
nname: 0
n 0(None)[time.sleep(1)
self._call(self._play)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664d6c>}
nname: 0
n 0(None)[self._call(self._stop)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664d4c>}
nname: 37
n 37(None)[self._call(self._play_title, title)
]:
	i: 3(), 19(), 36(AE)
	o: 

nname: 19
n 19(None)[print 'warning : except. parameter are incorrect'
title = 1
]:
	i: 0(except)
	o: 37()

nname: 3
n 3(None)[title = int(title)
]:
	i: 0(try)
	o: 37()

nname: 0
n 0(None)[]:
	i: 
	o: 3(try), 19(except)

nname: 19
n 19(None)[except:
	print 'warning : except. parameter are incorrect'
	title = 1
self._call(self._play_title, title)
]:
	i: 0()
	o: 

nname: 0
n 0(None)[try:
	title = int(title)
]:
	i: 
	o: 19()

nname: 0
n 0(None)[try:
	title = int(title)
except:
	print 'warning : except. parameter are incorrect'
	title = 1
self._call(self._play_title, title)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76c926c>}
nname: 55
n 55(None)[self._call(self._play_ptt, title, ptt)
]:
	i: 3(), 31(), 54(AE)
	o: 

nname: 31
n 31(None)[print 'warning : except. parameter are incorrect'
title = 1
ptt = 1
]:
	i: 0(except)
	o: 55()

nname: 3
n 3(None)[title = int(title)
ptt = int(ptt)
]:
	i: 0(try)
	o: 55()

nname: 0
n 0(None)[]:
	i: 
	o: 3(try), 31(except)

nname: 31
n 31(None)[except:
	print 'warning : except. parameter are incorrect'
	title = 1
	ptt = 1
self._call(self._play_ptt, title, ptt)
]:
	i: 0()
	o: 

nname: 0
n 0(None)[try:
	title = int(title)
	ptt = int(ptt)
]:
	i: 
	o: 31()

nname: 0
n 0(None)[try:
	title = int(title)
	ptt = int(ptt)
except:
	print 'warning : except. parameter are incorrect'
	title = 1
	ptt = 1
self._call(self._play_ptt, title, ptt)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664d4c>}
nname: 0
n 0(None)[ret = self._call(self._get_number_of_title)
return ret[0]
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76c928c>}
nname: 37
n 37(None)[ret = self._call(self._get_number_of_ptt, title)
return ret[0]
]:
	i: 3(), 19(), 36(AE)
	o: 

nname: 19
n 19(None)[print 'warning : except. parameter are incorrect'
title = 1
]:
	i: 0(except)
	o: 37()

nname: 3
n 3(None)[title = int(title)
]:
	i: 0(try)
	o: 37()

nname: 0
n 0(None)[]:
	i: 
	o: 3(try), 19(except)

nname: 19
n 19(None)[except:
	print 'warning : except. parameter are incorrect'
	title = 1
ret = self._call(self._get_number_of_ptt, title)
return ret[0]
]:
	i: 0()
	o: 

nname: 0
n 0(None)[try:
	title = int(title)
]:
	i: 
	o: 19()

nname: 0
n 0(None)[try:
	title = int(title)
except:
	print 'warning : except. parameter are incorrect'
	title = 1
ret = self._call(self._get_number_of_ptt, title)
return ret[0]
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664e8c>}
nname: 0
n 0(None)[ret = self._call(self._get_volume_name)
return ret[0]
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76c9b6c>}
nname: 0
n 0(None)[self._call(self._pause, True)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76c986c>}
nname: 0
n 0(None)[self._call(self._pause, False)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76c928c>}
nname: 37
n 37(None)[self._call(self._set_speed, speed)
]:
	i: 3(), 19(), 36(AE)
	o: 

nname: 19
n 19(None)[print 'warning : except. parameter are incorrect'
speed = 1
]:
	i: 0(except)
	o: 37()

nname: 3
n 3(None)[speed = float(speed)
]:
	i: 0(try)
	o: 37()

nname: 0
n 0(None)[]:
	i: 
	o: 3(try), 19(except)

nname: 19
n 19(None)[except:
	print 'warning : except. parameter are incorrect'
	speed = 1
self._call(self._set_speed, speed)
]:
	i: 0()
	o: 

nname: 0
n 0(None)[try:
	speed = float(speed)
]:
	i: 
	o: 19()

nname: 0
n 0(None)[try:
	speed = float(speed)
except:
	print 'warning : except. parameter are incorrect'
	speed = 1
self._call(self._set_speed, speed)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664dcc>}
nname: 37
n 37(None)[print 'ENTERING TRICK MODE'
self._call(self._set_trickmode, speed)
]:
	i: 3(), 19(), 36(AE)
	o: 

nname: 19
n 19(None)[print 'warnin : except parameter are incorrect'
speed = 1
]:
	i: 0(except)
	o: 37()

nname: 3
n 3(None)[speed = float(speed)
]:
	i: 0(try)
	o: 37()

nname: 0
n 0(None)[]:
	i: 
	o: 3(try), 19(except)

nname: 19
n 19(None)[except:
	print 'warnin : except parameter are incorrect'
	speed = 1
print 'ENTERING TRICK MODE'
self._call(self._set_trickmode, speed)
]:
	i: 0()
	o: 

nname: 0
n 0(None)[try:
	speed = float(speed)
]:
	i: 
	o: 19()

nname: 0
n 0(None)[try:
	speed = float(speed)
except:
	print 'warnin : except parameter are incorrect'
	speed = 1
print 'ENTERING TRICK MODE'
self._call(self._set_trickmode, speed)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664c2c>}
nname: 0
n 0(None)[ret = self._call(self._get_speed)
return ret[0]
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76c94ec>}
nname: 271
n 271(None)[info['bitspersample'] = ret[3]
info['samplespersecond'] = ret[4]
info['channels'] = ret[5]
return info
]:
	i: 235(), 260()
	o: 

nname: 260
n 260(None)[info['coding'] = 'None'
]:
	i: 210(f)
	o: 271()

nname: 235
n 235(None)[info['coding'] = self._audio_type[ret[2]]
]:
	i: 210(t)
	o: 271()

nname: 210
n 210(ret[2] < len(self._audio_type))[]:
	i: 153(), 199()
	o: 235(t), 260(f)

nname: 199
n 199(None)[info['language_ext'] = ''
]:
	i: 137(f)
	o: 210()

nname: 153
n 153(None)[info['language_ext'] = chr(ret[1] >> 8) + chr(ret[1] & 255)
]:
	i: 137(t)
	o: 210()

nname: 137
n 137(ret[1] != 0)[]:
	i: 80(), 126()
	o: 153(t), 199(f)

nname: 126
n 126(None)[info['language'] = ''
]:
	i: 37(f)
	o: 137()

nname: 80
n 80(None)[info['language'] = chr(ret[0] >> 8) + chr(ret[0] & 255)
]:
	i: 37(t)
	o: 137()

nname: 37
n 37(ret[0] != 0)[ret = self._call(self._get_audio_info, audio_stream)
info = {}
]:
	i: 3(), 19(), 36(AE)
	o: 80(t), 126(f)

nname: 19
n 19(None)[print 'warning : except. parameter are incorrect'
audio_stream = 0
]:
	i: 0(except)
	o: 37()

nname: 3
n 3(None)[audio_stream = int(audio_stream)
]:
	i: 0(try)
	o: 37()

nname: 0
n 0(None)[]:
	i: 
	o: 3(try), 19(except)

nname: 271
n 271(None)[info['bitspersample'] = ret[3]
info['samplespersecond'] = ret[4]
info['channels'] = ret[5]
return info
]:
	i: 137()
	o: 

nname: 137
n 137(None)[if ret[1] != 0:
	info['language_ext'] = chr(ret[1] >> 8) + chr(ret[1] & 255)
else:
	info['language_ext'] = ''
if ret[2] < len(self._audio_type):
	info['coding'] = self._audio_type[ret[2]]
else:
	info['coding'] = 'None'
]:
	i: 19()
	o: 271()

nname: 19
n 19(None)[except:
	print 'warning : except. parameter are incorrect'
	audio_stream = 0
ret = self._call(self._get_audio_info, audio_stream)
info = {}
if ret[0] != 0:
	info['language'] = chr(ret[0] >> 8) + chr(ret[0] & 255)
else:
	info['language'] = ''
]:
	i: 0()
	o: 137()

nname: 0
n 0(None)[try:
	audio_stream = int(audio_stream)
]:
	i: 
	o: 19()

nname: 137
n 137(None)[if ret[1] != 0:
	info['language_ext'] = chr(ret[1] >> 8) + chr(ret[1] & 255)
else:
	info['language_ext'] = ''
if ret[2] < len(self._audio_type):
	info['coding'] = self._audio_type[ret[2]]
else:
	info['coding'] = 'None'
info['bitspersample'] = ret[3]
info['samplespersecond'] = ret[4]
info['channels'] = ret[5]
return info
]:
	i: 0()
	o: 

nname: 0
n 0(None)[try:
	audio_stream = int(audio_stream)
except:
	print 'warning : except. parameter are incorrect'
	audio_stream = 0
ret = self._call(self._get_audio_info, audio_stream)
info = {}
if ret[0] != 0:
	info['language'] = chr(ret[0] >> 8) + chr(ret[0] & 255)
else:
	info['language'] = ''
]:
	i: 
	o: 137()

nname: 0
n 0(None)[try:
	audio_stream = int(audio_stream)
except:
	print 'warning : except. parameter are incorrect'
	audio_stream = 0
ret = self._call(self._get_audio_info, audio_stream)
info = {}
if ret[0] != 0:
	info['language'] = chr(ret[0] >> 8) + chr(ret[0] & 255)
else:
	info['language'] = ''
if ret[1] != 0:
	info['language_ext'] = chr(ret[1] >> 8) + chr(ret[1] & 255)
else:
	info['language_ext'] = ''
if ret[2] < len(self._audio_type):
	info['coding'] = self._audio_type[ret[2]]
else:
	info['coding'] = 'None'
info['bitspersample'] = ret[3]
info['samplespersecond'] = ret[4]
info['channels'] = ret[5]
return info
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76dc2cc>}
nname: 0
n 0(None)[ret = self._call(self._get_audio_stream)
return ret[0]
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76c9dec>}
nname: 37
n 37(None)[self._call(self._set_audio_stream, audio_stream)
]:
	i: 3(), 19(), 36(AE)
	o: 

nname: 19
n 19(None)[print 'warning : except. parameter are incorrect'
audio_stream = 0
]:
	i: 0(except)
	o: 37()

nname: 3
n 3(None)[audio_stream = int(audio_stream)
]:
	i: 0(try)
	o: 37()

nname: 0
n 0(None)[]:
	i: 
	o: 3(try), 19(except)

nname: 19
n 19(None)[except:
	print 'warning : except. parameter are incorrect'
	audio_stream = 0
self._call(self._set_audio_stream, audio_stream)
]:
	i: 0()
	o: 

nname: 0
n 0(None)[try:
	audio_stream = int(audio_stream)
]:
	i: 
	o: 19()

nname: 0
n 0(None)[try:
	audio_stream = int(audio_stream)
except:
	print 'warning : except. parameter are incorrect'
	audio_stream = 0
self._call(self._set_audio_stream, audio_stream)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664cac>}
nname: 0
n 0(None)[ret = self._call(self._get_sub_stream)
return ret[0]
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76c996c>}
nname: 146
n 146(None)[self._call(self._set_sub_stream, sub_stream, display)
]:
	i: 100(), 114(), 144(AE)
	o: 

nname: 144
n 144(None)[]:
	i: 104(f)
	o: 146(AE)

nname: 114
n 114(None)[#, e
print 'warning : except. parameter are incorrect :',
print e
sub_stream = 0
display = True
]:
	i: 104(t)
	o: 146()

nname: 104
n 104(<dummy_ex3> EXC_MATCH Exception)[]:
	i: 0(except)
	o: 114(t), 144(f)

nname: 100
n 100(None)[]:
	i: 67(JA), 77(), 87()
	o: 146()

nname: 87
n 87(None)[display = bool(display)
]:
	i: 21(f)
	o: 100()

nname: 77
n 77(None)[display = False
]:
	i: 48(f)
	o: 100()

nname: 67
n 67(None)[display = True
]:
	i: 48(t)
	o: 100(JA)

nname: 48
n 48(display.lower() == 'true')[]:
	i: 21(t)
	o: 67(t), 77(f)

nname: 21
n 21(isinstance(display, str))[sub_stream = int(sub_stream)
]:
	i: 0(try)
	o: 48(t), 87(f)

nname: 0
n 0(None)[print 'sub_stream',
print sub_stream
print 'display',
print display
]:
	i: 
	o: 21(try), 104(except)

nname: 104
n 104(None)[except Exception, e:
	print 'warning : except. parameter are incorrect :',
	print e
	sub_stream = 0
	display = True
else:
	pass
self._call(self._set_sub_stream, sub_stream, display)
]:
	i: 0()
	o: 

nname: 0
n 0(None)[print 'sub_stream',
print sub_stream
print 'display',
print display
try:
	sub_stream = int(sub_stream)
	if isinstance(display, str):
		if display.lower() == 'true':
			display = True
		else:
			display = False
	else:
		display = bool(display)
]:
	i: 
	o: 104()

nname: 0
n 0(None)[print 'sub_stream',
print sub_stream
print 'display',
print display
try:
	sub_stream = int(sub_stream)
	if isinstance(display, str):
		if display.lower() == 'true':
			display = True
		else:
			display = False
	else:
		display = bool(display)
except Exception, e:
	print 'warning : except. parameter are incorrect :',
	print e
	sub_stream = 0
	display = True
else:
	pass
self._call(self._set_sub_stream, sub_stream, display)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76dc30c>}
nname: 163
n 163(None)[self._call(self._set_langage, audio_dec, 0, sub_dec, 0)
]:
	i: 67(), 139(), 162(AE)
	o: 

nname: 139
n 139(None)[print 'warning : except. parameter are incorrect'
audio_dec = 25966
sub_dec = 25966
]:
	i: 0(except)
	o: 163()

nname: 67
n 67(None)[audio_dec = ord(audio_lang[0]) << 8 | ord(audio_lang[1])
sub_dec = ord(sub_lang[0]) << 8 | ord(sub_lang[1])
]:
	i: 56(), 66()
	o: 163()

nname: 66
n 66(None)[]:
	i: 35(f)
	o: 67()

nname: 56
n 56(None)[sub_lang = 'en'
]:
	i: 35(t)
	o: 67()

nname: 35
n 35(isinstance(sub_lang, str) == False)[]:
	i: 24(), 34()
	o: 56(t), 66(f)

nname: 34
n 34(None)[]:
	i: 3(f)
	o: 35()

nname: 24
n 24(None)[audio_lang = 'en'
]:
	i: 3(t)
	o: 35()

nname: 3
n 3(isinstance(audio_lang, str) == False)[]:
	i: 0(try)
	o: 24(t), 34(f)

nname: 0
n 0(None)[]:
	i: 
	o: 3(try), 139(except)

nname: 163
n 163(None)[self._call(self._set_langage, audio_dec, 0, sub_dec, 0)
]:
	i: 35(), 139()
	o: 

nname: 139
n 139(None)[except:
	print 'warning : except. parameter are incorrect'
	audio_dec = 25966
	sub_dec = 25966
]:
	i: 0()
	o: 163()

nname: 35
n 35(None)[if isinstance(sub_lang, str) == False:
	sub_lang = 'en'
audio_dec = ord(audio_lang[0]) << 8 | ord(audio_lang[1])
sub_dec = ord(sub_lang[0]) << 8 | ord(sub_lang[1])
]:
	i: 0()
	o: 163()

nname: 0
n 0(None)[try:
	if isinstance(audio_lang, str) == False:
		audio_lang = 'en'
]:
	i: 
	o: 35(), 139()

self.nodes: {0: <unpyclib.structure.node instance at 0xb76dc1ec>, 163: <unpyclib.structure.node instance at 0xb76dc2cc>, 35: <unpyclib.structure.node instance at 0xb76dc94c>, 139: <unpyclib.structure.node instance at 0xb76dce6c>}
nname: 80
n 80(None)[self._call(self._select_menu, menu_type)
]:
	i: 58(), 62(), 79(AE)
	o: 

nname: 62
n 62(None)[print 'warning : except. parameter are incorrect'
menu_type = 0
]:
	i: 0(except)
	o: 80()

nname: 58
n 58(None)[]:
	i: 34(), 51()
	o: 80()

nname: 51
n 51(None)[menu_type = 0
]:
	i: 3&18(f)
	o: 58()

nname: 34
n 34(None)[menu_type = self._menu_type[menu]
]:
	i: 3&18(t)
	o: 58()

nname: 3&18
n 3&18(isinstance(menu, str) and menu in self._menu_type)[]:
	i: 0(try)
	o: 34(t), 51(f)

nname: 0
n 0(None)[]:
	i: 
	o: 3&18(try), 62(except)

nname: 80
n 80(None)[self._call(self._select_menu, menu_type)
]:
	i: 62(), 0()
	o: 

nname: 62
n 62(None)[except:
	print 'warning : except. parameter are incorrect'
	menu_type = 0
]:
	i: 0()
	o: 80()

nname: 80
n 80(None)[self._call(self._select_menu, menu_type)
]:
	i: 62(), 0()
	o: 

nname: 0
n 0(None)[try:
	if isinstance(menu, str) and menu in self._menu_type:
		menu_type = self._menu_type[menu]
	else:
		menu_type = 0
]:
	i: 
	o: 80(), 62()

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664e6c>, 80: <unpyclib.structure.node instance at 0xb7664e8c>, 62: <unpyclib.structure.node instance at 0xb7664e4c>}
nname: 137
n 137(None)[return info
]:
	i: 80(), 126()
	o: 

nname: 126
n 126(None)[info['language'] = ''
]:
	i: 37(f)
	o: 137()

nname: 80
n 80(None)[info['language'] = chr(ret[0] >> 8) + chr(ret[0] & 255)
]:
	i: 37(t)
	o: 137()

nname: 37
n 37(ret[0] != 0)[ret = self._call(self._get_sub_info, sub_stream)
info = {}
]:
	i: 3(), 19(), 36(AE)
	o: 80(t), 126(f)

nname: 19
n 19(None)[print 'warning : except. parameter are incorrect'
sub_stream = 0
]:
	i: 0(except)
	o: 37()

nname: 3
n 3(None)[sub_stream = int(sub_stream)
]:
	i: 0(try)
	o: 37()

nname: 0
n 0(None)[]:
	i: 
	o: 3(try), 19(except)

nname: 137
n 137(None)[return info
]:
	i: 19()
	o: 

nname: 19
n 19(None)[except:
	print 'warning : except. parameter are incorrect'
	sub_stream = 0
ret = self._call(self._get_sub_info, sub_stream)
info = {}
if ret[0] != 0:
	info['language'] = chr(ret[0] >> 8) + chr(ret[0] & 255)
else:
	info['language'] = ''
]:
	i: 0()
	o: 137()

nname: 0
n 0(None)[try:
	sub_stream = int(sub_stream)
]:
	i: 
	o: 19()

nname: 137
n 137(None)[return info
]:
	i: 0()
	o: 

nname: 0
n 0(None)[try:
	sub_stream = int(sub_stream)
except:
	print 'warning : except. parameter are incorrect'
	sub_stream = 0
ret = self._call(self._get_sub_info, sub_stream)
info = {}
if ret[0] != 0:
	info['language'] = chr(ret[0] >> 8) + chr(ret[0] & 255)
else:
	info['language'] = ''
]:
	i: 
	o: 137()

nname: 0
n 0(None)[try:
	sub_stream = int(sub_stream)
except:
	print 'warning : except. parameter are incorrect'
	sub_stream = 0
ret = self._call(self._get_sub_info, sub_stream)
info = {}
if ret[0] != 0:
	info['language'] = chr(ret[0] >> 8) + chr(ret[0] & 255)
else:
	info['language'] = ''
return info
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664ecc>}
nname: 0
n 0(None)[ret = self._call(self._get_available_stream)
stream = {}
stream['nb_audio'] = ret[0]
stream['nb_sub'] = ret[1]
return stream
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76c9cac>}
nname: 130
n 130(None)[self._call(self._action_button, action_type, num_button)
]:
	i: 83(), 99(), 129(AE)
	o: 

nname: 99
n 99(None)[print 'warning : except. parameter are incorrect'
action_type = self._action_type['activate']
num_button = 0
]:
	i: 0(except)
	o: 130()

nname: 83
n 83(None)[num_button = int(num_button)
]:
	i: 52(), 69()
	o: 130()

nname: 69
n 69(None)[action_type = self._action_type['activate']
]:
	i: 21&36(f)
	o: 83()

nname: 52
n 52(None)[action_type = self._action_type[action]
]:
	i: 21&36(t)
	o: 83()

nname: 21&36
n 21&36(isinstance(action, str) and action in self._action_type)[]:
	i: 0(try)
	o: 52(t), 69(f)

nname: 0
n 0(None)[print 'action_button ',
print action
print 'num_button ',
print num_button
]:
	i: 
	o: 21&36(try), 99(except)

nname: 130
n 130(None)[self._call(self._action_button, action_type, num_button)
]:
	i: 83(), 99()
	o: 

nname: 99
n 99(None)[except:
	print 'warning : except. parameter are incorrect'
	action_type = self._action_type['activate']
	num_button = 0
]:
	i: 0()
	o: 130()

nname: 83
n 83(None)[num_button = int(num_button)
]:
	i: 0()
	o: 130()

nname: 0
n 0(None)[print 'action_button ',
print action
print 'num_button ',
print num_button
try:
	if isinstance(action, str) and action in self._action_type:
		action_type = self._action_type[action]
	else:
		action_type = self._action_type['activate']
]:
	i: 
	o: 83(), 99()

self.nodes: {0: <unpyclib.structure.node instance at 0xb76dc66c>, 130: <unpyclib.structure.node instance at 0xb76dc32c>, 99: <unpyclib.structure.node instance at 0xb76dc30c>, 83: <unpyclib.structure.node instance at 0xb76dc7ac>}
nname: 0
n 0(None)[ret = self._call(self._get_button_info)
button = {}
button['min'] = ret[0]
button['nb'] = ret[1]
button['current'] = ret[2]
return button
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76c9bcc>}
nname: 80
n 80(None)[self._call(self._set_display_mode, display_type)
]:
	i: 58(), 62(), 79(AE)
	o: 

nname: 62
n 62(None)[print 'warning : except. parameter are incorrect'
display_type = 0
]:
	i: 0(except)
	o: 80()

nname: 58
n 58(None)[]:
	i: 34(), 51()
	o: 80()

nname: 51
n 51(None)[display_type = 0
]:
	i: 3&18(f)
	o: 58()

nname: 34
n 34(None)[display_type = self._display_mode_set[display_mode]
]:
	i: 3&18(t)
	o: 58()

nname: 3&18
n 3&18(isinstance(display_mode, str) and display_mode in self._display_mode_set)[]:
	i: 0(try)
	o: 34(t), 51(f)

nname: 0
n 0(None)[]:
	i: 
	o: 3&18(try), 62(except)

nname: 80
n 80(None)[self._call(self._set_display_mode, display_type)
]:
	i: 62(), 0()
	o: 

nname: 62
n 62(None)[except:
	print 'warning : except. parameter are incorrect'
	display_type = 0
]:
	i: 0()
	o: 80()

nname: 80
n 80(None)[self._call(self._set_display_mode, display_type)
]:
	i: 62(), 0()
	o: 

nname: 0
n 0(None)[try:
	if isinstance(display_mode, str) and display_mode in self._display_mode_set:
		display_type = self._display_mode_set[display_mode]
	else:
		display_type = 0
]:
	i: 
	o: 80(), 62()

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664c4c>, 80: <unpyclib.structure.node instance at 0xb7664fec>, 62: <unpyclib.structure.node instance at 0xb7664f6c>}
nname: 0
n 0(None)[ret = self._call(self._get_display_mode)
return self._display_mode_get[ret[0]]
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76c986c>}
nname: 0
n 0(None)[ret = self._call(self._get_ptt_location)
info = {}
info['num'] = ret[0]
info['hours'] = ret[1]
info['minutes'] = ret[2]
info['seconds'] = ret[3]
return info
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664d6c>}
nname: 0
n 0(None)[ret = self._call(self._get_ptt_duration)
info = {}
info['num'] = ret[0]
info['hours'] = ret[1]
info['minutes'] = ret[2]
info['seconds'] = ret[3]
return info
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664b8c>}
nname: 0
n 0(None)[ret = self._call(self._get_title_location)
info = {}
info['num'] = ret[0]
info['hours'] = ret[1]
info['minutes'] = ret[2]
info['seconds'] = ret[3]
return info
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664bec>}
nname: 0
n 0(None)[ret = self._call(self._get_title_duration)
info = {}
info['num'] = ret[0]
info['hours'] = ret[1]
info['minutes'] = ret[2]
info['seconds'] = ret[3]
return info
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664c6c>}
nname: 91
n 91(None)[self._call(self._set_langage, menu_dec)
]:
	i: 35(), 73(), 90(AE)
	o: 

nname: 73
n 73(None)[print 'warning : except. parameter are incorrect'
menu_dec = 25966
]:
	i: 0(except)
	o: 91()

nname: 35
n 35(None)[menu_dec = ord(menu_lang[0]) << 8 | ord(menu_lang[1])
]:
	i: 24(), 34()
	o: 91()

nname: 34
n 34(None)[]:
	i: 3(f)
	o: 35()

nname: 24
n 24(None)[menu_lang = 'en'
]:
	i: 3(t)
	o: 35()

nname: 3
n 3(isinstance(menu_lang, str) == False)[]:
	i: 0(try)
	o: 24(t), 34(f)

nname: 0
n 0(None)[]:
	i: 
	o: 3(try), 73(except)

nname: 91
n 91(None)[self._call(self._set_langage, menu_dec)
]:
	i: 35(), 73()
	o: 

nname: 73
n 73(None)[except:
	print 'warning : except. parameter are incorrect'
	menu_dec = 25966
]:
	i: 0()
	o: 91()

nname: 35
n 35(None)[menu_dec = ord(menu_lang[0]) << 8 | ord(menu_lang[1])
]:
	i: 0()
	o: 91()

nname: 0
n 0(None)[try:
	if isinstance(menu_lang, str) == False:
		menu_lang = 'en'
]:
	i: 
	o: 35(), 73()

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664d0c>, 73: <unpyclib.structure.node instance at 0xb7664f0c>, 35: <unpyclib.structure.node instance at 0xb7664dcc>, 91: <unpyclib.structure.node instance at 0xb7664e8c>}
nname: 0
n 0(None)[self._call(self._next_chapter)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76c98cc>}
nname: 0
n 0(None)[self._call(self._previous_chapter)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76c9cac>}
nname: 0
n 0(None)[ret = self._call(self._get_player_mode)
return self._player_mode[ret[0]]
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76c9ccc>}
nname: 80
n 80(None)[ret = self._call(self._check_menu_available, menu_type)
return bool(ret[0])
]:
	i: 58(), 62(), 79(AE)
	o: 

nname: 62
n 62(None)[print 'warning : except. parameter are incorrect'
menu_type = 0
]:
	i: 0(except)
	o: 80()

nname: 58
n 58(None)[]:
	i: 34(), 51()
	o: 80()

nname: 51
n 51(None)[menu_type = 0
]:
	i: 3&18(f)
	o: 58()

nname: 34
n 34(None)[menu_type = self._menu_type[menu]
]:
	i: 3&18(t)
	o: 58()

nname: 3&18
n 3&18(isinstance(menu, str) and menu in self._menu_type)[]:
	i: 0(try)
	o: 34(t), 51(f)

nname: 0
n 0(None)[]:
	i: 
	o: 3&18(try), 62(except)

nname: 80
n 80(None)[ret = self._call(self._check_menu_available, menu_type)
return bool(ret[0])
]:
	i: 62(), 0()
	o: 

nname: 62
n 62(None)[except:
	print 'warning : except. parameter are incorrect'
	menu_type = 0
]:
	i: 0()
	o: 80()

nname: 80
n 80(None)[ret = self._call(self._check_menu_available, menu_type)
return bool(ret[0])
]:
	i: 62(), 0()
	o: 

nname: 0
n 0(None)[try:
	if isinstance(menu, str) and menu in self._menu_type:
		menu_type = self._menu_type[menu]
	else:
		menu_type = 0
]:
	i: 
	o: 80(), 62()

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664d4c>, 80: <unpyclib.structure.node instance at 0xb7664e6c>, 62: <unpyclib.structure.node instance at 0xb7664d6c>}
nname: 0
n 0(None)[self._call(self._resume)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76c9dec>}
nname: 37
n 37(None)[self._call(self._set_parental_level, level)
]:
	i: 3(), 19(), 36(AE)
	o: 

nname: 19
n 19(None)[print 'warning : except. parameter are incorrect'
level = 1
]:
	i: 0(except)
	o: 37()

nname: 3
n 3(None)[level = int(level)
]:
	i: 0(try)
	o: 37()

nname: 0
n 0(None)[]:
	i: 
	o: 3(try), 19(except)

nname: 19
n 19(None)[except:
	print 'warning : except. parameter are incorrect'
	level = 1
self._call(self._set_parental_level, level)
]:
	i: 0()
	o: 

nname: 0
n 0(None)[try:
	level = int(level)
]:
	i: 
	o: 19()

nname: 0
n 0(None)[try:
	level = int(level)
except:
	print 'warning : except. parameter are incorrect'
	level = 1
self._call(self._set_parental_level, level)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664dec>}
nname: 37
n 37(None)[self._call(self._set_parental_country, country)
]:
	i: 3(), 19(), 36(AE)
	o: 

nname: 19
n 19(None)[print 'warning : except. parameter are incorrect'
country = 1
]:
	i: 0(except)
	o: 37()

nname: 3
n 3(None)[country = int(country)
]:
	i: 0(try)
	o: 37()

nname: 0
n 0(None)[]:
	i: 
	o: 3(try), 19(except)

nname: 19
n 19(None)[except:
	print 'warning : except. parameter are incorrect'
	country = 1
self._call(self._set_parental_country, country)
]:
	i: 0()
	o: 

nname: 0
n 0(None)[try:
	country = int(country)
]:
	i: 
	o: 19()

nname: 0
n 0(None)[try:
	country = int(country)
except:
	print 'warning : except. parameter are incorrect'
	country = 1
self._call(self._set_parental_country, country)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664b8c>}
nname: 0
n 0(None)[ret = self._call(self._get_parental_info)
info = {}
info['level'] = ret[0]
info['country'] = ret[1]
info['is_parental'] = ret[2]
return info
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76c9f4c>}
nname: 91
n 91(None)[self._call(self._time_play, title, hours, minutes, seconds)
]:
	i: 3(), 55(), 90(AE)
	o: 

nname: 55
n 55(None)[print 'warning : except. parameter are incorrect'
title = 1
hours = 0
minutes = 0
seconds = 0
]:
	i: 0(except)
	o: 91()

nname: 3
n 3(None)[title = int(title)
hours = int(hours)
minutes = int(minutes)
seconds = int(seconds)
]:
	i: 0(try)
	o: 91()

nname: 0
n 0(None)[]:
	i: 
	o: 3(try), 55(except)

nname: 55
n 55(None)[except:
	print 'warning : except. parameter are incorrect'
	title = 1
	hours = 0
	minutes = 0
	seconds = 0
self._call(self._time_play, title, hours, minutes, seconds)
]:
	i: 0()
	o: 

nname: 0
n 0(None)[try:
	title = int(title)
	hours = int(hours)
	minutes = int(minutes)
	seconds = int(seconds)
]:
	i: 
	o: 55()

nname: 0
n 0(None)[try:
	title = int(title)
	hours = int(hours)
	minutes = int(minutes)
	seconds = int(seconds)
except:
	print 'warning : except. parameter are incorrect'
	title = 1
	hours = 0
	minutes = 0
	seconds = 0
self._call(self._time_play, title, hours, minutes, seconds)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664eac>}
nname: 73
n 73(None)[self._call(self._time_search, hours, minutes, seconds)
]:
	i: 3(), 43(), 72(AE)
	o: 

nname: 43
n 43(None)[print 'warning : except. parameter are incorrect'
hours = 0
minutes = 0
seconds = 0
]:
	i: 0(except)
	o: 73()

nname: 3
n 3(None)[hours = int(hours)
minutes = int(minutes)
seconds = int(seconds)
]:
	i: 0(try)
	o: 73()

nname: 0
n 0(None)[]:
	i: 
	o: 3(try), 43(except)

nname: 43
n 43(None)[except:
	print 'warning : except. parameter are incorrect'
	hours = 0
	minutes = 0
	seconds = 0
self._call(self._time_search, hours, minutes, seconds)
]:
	i: 0()
	o: 

nname: 0
n 0(None)[try:
	hours = int(hours)
	minutes = int(minutes)
	seconds = int(seconds)
]:
	i: 
	o: 43()

nname: 0
n 0(None)[try:
	hours = int(hours)
	minutes = int(minutes)
	seconds = int(seconds)
except:
	print 'warning : except. parameter are incorrect'
	hours = 0
	minutes = 0
	seconds = 0
self._call(self._time_search, hours, minutes, seconds)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664bac>}
nname: 37
n 37(None)[self._call(self._set_angle, angle)
]:
	i: 3(), 19(), 36(AE)
	o: 

nname: 19
n 19(None)[print 'warning : except. parameter are incorrect'
angle = 1
]:
	i: 0(except)
	o: 37()

nname: 3
n 3(None)[angle = int(angle)
]:
	i: 0(try)
	o: 37()

nname: 0
n 0(None)[]:
	i: 
	o: 3(try), 19(except)

nname: 19
n 19(None)[except:
	print 'warning : except. parameter are incorrect'
	angle = 1
self._call(self._set_angle, angle)
]:
	i: 0()
	o: 

nname: 0
n 0(None)[try:
	angle = int(angle)
]:
	i: 
	o: 19()

nname: 0
n 0(None)[try:
	angle = int(angle)
except:
	print 'warning : except. parameter are incorrect'
	angle = 1
self._call(self._set_angle, angle)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664ecc>}
nname: 37
n 37(None)[ret = self._call(self._get_number_of_angle, title)
return ret[0]
]:
	i: 3(), 19(), 36(AE)
	o: 

nname: 19
n 19(None)[print 'warning : except. parameter are incorrect'
title = 1
]:
	i: 0(except)
	o: 37()

nname: 3
n 3(None)[title = int(title)
]:
	i: 0(try)
	o: 37()

nname: 0
n 0(None)[]:
	i: 
	o: 3(try), 19(except)

nname: 19
n 19(None)[except:
	print 'warning : except. parameter are incorrect'
	title = 1
ret = self._call(self._get_number_of_angle, title)
return ret[0]
]:
	i: 0()
	o: 

nname: 0
n 0(None)[try:
	title = int(title)
]:
	i: 
	o: 19()

nname: 0
n 0(None)[try:
	title = int(title)
except:
	print 'warning : except. parameter are incorrect'
	title = 1
ret = self._call(self._get_number_of_angle, title)
return ret[0]
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664c6c>}
nname: 0
n 0(None)[ret = self._call(self._get_current_angle)
return ret[0]
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76c9cac>}
nname: 80
n 80(None)[self._call(self._set_video_output, video_mode)
]:
	i: 58(), 62(), 79(AE)
	o: 

nname: 62
n 62(None)[print 'warning : except. parameter are incorrect'
video_mode = 0
]:
	i: 0(except)
	o: 80()

nname: 58
n 58(None)[]:
	i: 34(), 51()
	o: 80()

nname: 51
n 51(None)[video_mode = 0
]:
	i: 3&18(f)
	o: 58()

nname: 34
n 34(None)[video_mode = self._video_mode_set[video]
]:
	i: 3&18(t)
	o: 58()

nname: 3&18
n 3&18(isinstance(video, str) and video in self._video_mode_set)[]:
	i: 0(try)
	o: 34(t), 51(f)

nname: 0
n 0(None)[]:
	i: 
	o: 3&18(try), 62(except)

nname: 80
n 80(None)[self._call(self._set_video_output, video_mode)
]:
	i: 62(), 0()
	o: 

nname: 62
n 62(None)[except:
	print 'warning : except. parameter are incorrect'
	video_mode = 0
]:
	i: 0()
	o: 80()

nname: 80
n 80(None)[self._call(self._set_video_output, video_mode)
]:
	i: 62(), 0()
	o: 

nname: 0
n 0(None)[try:
	if isinstance(video, str) and video in self._video_mode_set:
		video_mode = self._video_mode_set[video]
	else:
		video_mode = 0
]:
	i: 
	o: 80(), 62()

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664c0c>, 80: <unpyclib.structure.node instance at 0xb7664b8c>, 62: <unpyclib.structure.node instance at 0xb7664c2c>}
nname: 0
n 0(None)[ret = self._call(self._is_sub_enabled)
return bool(ret[0])
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76c98cc>}
nname: 37
n 37(None)[self._call(self._seek_percent, 10, direction)
]:
	i: 3(), 19(), 36(AE)
	o: 

nname: 19
n 19(None)[print 'warning : except. parameter are incorrect'
direction = 1
]:
	i: 0(except)
	o: 37()

nname: 3
n 3(None)[direction = int(direction)
]:
	i: 0(try)
	o: 37()

nname: 0
n 0(None)[]:
	i: 
	o: 3(try), 19(except)

nname: 19
n 19(None)[except:
	print 'warning : except. parameter are incorrect'
	direction = 1
self._call(self._seek_percent, 10, direction)
]:
	i: 0()
	o: 

nname: 0
n 0(None)[try:
	direction = int(direction)
]:
	i: 
	o: 19()

nname: 0
n 0(None)[try:
	direction = int(direction)
except:
	print 'warning : except. parameter are incorrect'
	direction = 1
self._call(self._seek_percent, 10, direction)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7664cac>}
nname: 0
n 0(None)[self._call(self._set_breakpoint)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76c98ec>}
nname: 27
n 27(None)[self._set_surround(int(enable))
]:
	i: 18(), 26()
	o: 

nname: 26
n 26(None)[]:
	i: 0(f)
	o: 27()

nname: 18
n 18(None)[]:
	i: 0(t)
	o: 27()

nname: 0
n 0(enable not in (False, True))[]:
	i: 
	o: 18(t), 26(f)

nname: 0
n 0(None)[if enable not in (False, True):
	pass
self._set_surround(int(enable))
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76c9e2c>}
nname: 0
n 0(None)[self._call(self._test)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76c9c0c>}
nname: 6
n 6(None)[__doc__ = "WyDVD client interface.\n\n    Example usage:\n\n    >> from wydvd import Wydvd\n    >> wdd = Wydvd()\n    >> wdd.open('/media/DVD-ISO/Orgazmo.iso')\n    >> wdd.play()\n    >> wdd.stop()\n    >> wdd.close()    \n\n    State for documentation:\n    \n    "
_dbus_name = 'com.wyplay.wydvd'
_dbus_path = '/com/wyplay/WyDVD'
_domain_type = ('FIRST_PLAY', 'VIDEO_MANAGER_MENU', 'VTS_MENU', 'TITLE', 'STOP', 'AMGM_DOM', 'TT_GR_DOM')
_player_mode = ('DEFAULT', 'STOPPED', 'PAUSED', 'STILL', 'PLAYING', 'BUSY', 'SCANNING', 'INACTIVE', 'REVERSEPLAY', 'TRICKPLAY', 'REVERSESCAN')
_event_type = ('WYDVD_TITLE_CHANGE', 'WYDVD_PART_OF_TITLE_CHANGE', 'WYDVD_VALID_UOP_CHANGE', 'WYDVD_ANGLE_CHANGE', 'WYDVD_AUDIO_STREAM_CHANGE', 'WYDVD_SUBPICTURE_STREAM_CHANGE', 'WYDVD_DOMAIN_CHANGE', 'WYDVD_PARENTAL_LEVEL_CHANGE', 'WYDVD_BITRATE_CHANGE', 'WYDVD_STILL_ON', 'WYDVD_STILL_OFF', 'WYDVD_PLAYBACK_MODE_CHANGE', 'WYDVD_READ_ERROR', 'WYDVD_DISPLAY_MODE_CHANGE', 'WYDVD_STREAMS_CHANGE', 'WYDVD_PLAYBACK_SPEED_CHANGE', 'WYDVD_VIDEO_STANDARD_CHANGE', 'WYDVD_BREAKPOINT_REACHED', 'WYDVD_ERROR', 'WYDVD_NAV_COMMAND_EXEC', 'WYDVD_SEARCH_COMPLETE', 'WYDVD_NAVIGATION_MODE_CHANGE', 'WYDVD_IMAGE_DECODE_COMPLETE', 'WYDVD_CGMS_APS_WSS_CHANGE', 'WYDVD_UNKNOWN')
_audio_type = ('AC3', 'MPEG1', 'MPEG2', 'LPCM', 'DTS', 'SDDS', 'WMA', 'DSD', 'MLP')
_menu_type = dict(title=0, root=1, sub=2, audio=3, angle=4, ptt=5)
_action_type = dict(up=0, down=1, right=2, left=3, activate=4, select_activate=5)
_display_mode_set = {'4_3': 0, '16_9': 1, 'letterbox': 2, 'panscan': 3, 'none': 4, '4_3_letterbox': 5}
_display_mode_get = ('4_3', '16_9', 'letterbox', 'panscan', 'none', '4_3_letterbox')
_video_mode_set = {'NONE': 0, 'PAL': 1, 'NTSC': 2}
_video_mode_get = ('NONE', 'PAL', 'NTSC')
_reader = None
_wss_change_type = ('DCAWC_NONE', 'DCAWC_COPY_MODE', 'DCAWC_COPY_PROTECTION', 'DCAWC_ANALOGUE_SOURCE_MODE', 'DCAWC_MPEG_PRESENTATION_MODE', 'DCAWC_WSS_ASPECT_RATIO', 'DCAWC_FILM_CAMERA_MODE', 'DCAWC_SUBTITLING_MODE')
_copy_mode = ('VCPMD_INVALID', 'VCPMD_UNKNOWN,VCPMD_DEFAULT', 'VCPMD_COPYING_PERMITTED', 'VCPMD_ONE_COPY_PERMITTED', 'VCPMD_NO_COPYING_PERMITTED', 'VCPMD_NUMBER')
_copy_protection = ('VCP_OFF', 'VCP_STAGE1', 'VCP_STAGE2', 'VCP_STAGE3')
_video_analog_source_mode = ('VASMD_DEFAULT', 'VASMD_ANALOGUE_PRE_RECORDED', 'VASMD_NOT_ANALOGUE_PRE_RECORDED')
_video_presentation_mode = ('VPRM_INVALID', 'VPRM_UNKNOWN', 'VPRM_4_BY_3_NORMAL', 'VPRM_4_BY_3_FULL', 'VPRM_4_BY_3_LETTERBOXED', 'VPRM_16_BY_9_ANAMORPHIC', 'VPRM_14_BY_9_LETTERBOXED_CENTER', 'VPRM_14_BY_9_LETTERBOXED_TOP', 'VPRM_16_BY_9_LETTERBOXED_TOP', 'VPRM_LARGE_16_BY_9_LETTERBOXED_CENTER', 'VPRM_14_BY_9_ANAMORPHIC', 'VPRM_RESERVED', 'VPRM_NUMBER')
_video_film_camera_mode = ('VFCMD_DEFAULT', 'VFCMD_CAMERA', 'VFCMD_FILM')
_video_sub_mode = ('VSTM_DEFAULT', 'VSTM_NO_SUBTITLE', 'VSTM_INSIDE_ACTIVE_PICTURE', 'VSTM_OUTSIDE_ACTIVE_PICTURE')
_wydvd_error = ('WYDVD_OK', 'WYDVD_ERROR', 'WYDVD_NOT_ENOUGH_MEMORY', 'WYDVD_UOP_PROHIBITED', 'WYDVD_NO_RESUME_INFORMATION', 'WYDVD_TITLE_NOT_FOUND', 'WYDVD_RANGE_VIOLATION', 'WYDVD_INVALID_PARAMETERS', 'WYDVD_OBJECT_NOT_FOUND', 'WYDVD_PARENTAL_LEVEL_TOO_LOW', 'WYDVD_OPERATION_NOT_SUPPORTED', 'WYDVD_UNIMPLEMENTED', 'WYDVD_BUTTON_NOT_FOUND', 'WYDVD_NO_FIRST_PLAY_PGC', 'WYDVD_UNEXPECTED_NAVIGATION_ERROR', 'WYDVD_OBJECT_EMPTY', 'WYDVD_OBJECT_IN_USE', 'WYDVD_INVALID_CONFIGURE_STATE', 'WYDVD_OPERATION_PROHIBITED')
def __init__(self, dbus=None):
	self._client_callback = None
	self._iso = False
	if dbus:
		self.wdb = dbus
		self.ref = self.wdb.reference(self._dbus_name, self._dbus_path)
		self.event_inst = self.wdb.instance(self._dbus_path)
	else:
		self.wdb_client = WyDbus('com.wyplay.wyplay_client', system=True)
		self.ref = self.wdb_client.reference(self._dbus_name, self._dbus_path)
		self.event_inst = self.wdb_client.instance(self._dbus_path)
	self.event_inst.signal('event_callback', 'ii', self._event_callback, WDB_AS_THREAD)
	self.event_inst.signal('ready', '', self._ready, WDB_AS_THREAD)
	self.ready_event = Event()
	self._open = self.ref.method('open', '', 'i')
	self._close = self.ref.method('close', '', 'i')
	self._play = self.ref.method('play', '', 'i')
	self._stop = self.ref.method('stop', '', 'i')
	self._play_title = self.ref.method('play_title', 'i', 'i')
	self._play_ptt = self.ref.method('play_ptt', 'ii', 'i')
	self._get_number_of_title = self.ref.method('get_number_of_title', '', '(ii)')
	self._get_number_of_ptt = self.ref.method('get_number_of_ptt', 'i', '(ii)')
	self._get_volume_name = self.ref.method('get_volume_name', '', '(is)')
	self._get_audio_stream = self.ref.method('get_audio_stream', '', '(ii)')
	self._set_audio_stream = self.ref.method('set_audio_stream', 'i', 'i')
	self._get_sub_stream = self.ref.method('get_sub_stream', '', '(ii)')
	self._set_sub_stream = self.ref.method('set_sub_stream', 'ib', 'i')
	self._pause = self.ref.method('pause', 'b', 'i')
	self._set_speed = self.ref.method('set_speed', 'd', 'i')
	self._set_trickmode = self.ref.method('set_trickmode', 'd', 'i')
	self._get_speed = self.ref.method('get_speed', '', '(id)')
	self._get_audio_info = self.ref.method('get_audio_info', 'i', '(iiiiiiiiiiiii)')
	self._get_sub_info = self.ref.method('get_sub_info', 'i', '(iii)')
	self._set_langage = self.ref.method('set_langage', 'iiii', 'i')
	self._select_menu = self.ref.method('select_menu', 'i', 'i')
	self._get_available_stream = self.ref.method('get_available_stream', '', '(iii)')
	self._action_button = self.ref.method('action_button', 'ii', 'i')
	self._get_button_info = self.ref.method('get_button_info', '', '(iiii)')
	self._set_display_mode = self.ref.method('set_display_mode', 'i', 'i')
	self._get_display_mode = self.ref.method('get_display_mode', '', '(ii)')
	self._get_ptt_location = self.ref.method('get_ptt_location', '', '(iiiii)')
	self._get_title_location = self.ref.method('get_title_location', '', '(iiiii)')
	self._get_ptt_duration = self.ref.method('get_ptt_duration', '', '(iiiii)')
	self._get_title_duration = self.ref.method('get_title_duration', '', '(iiiii)')
	self._set_menu_langage = self.ref.method('set_menu_langage', 'i', 'i')
	self._next_chapter = self.ref.method('next_chapter', '', 'i')
	self._previous_chapter = self.ref.method('previous_chapter', '', 'i')
	self._get_player_mode = self.ref.method('get_player_mode', '', '(ii)')
	self._check_menu_available = self.ref.method('check_menu_available', 'i', '(ii)')
	self._resume = self.ref.method('resume', '', 'i')
	self._set_parental_level = self.ref.method('set_parental_level', 'i', 'i')
	self._set_parental_country = self.ref.method('set_parental_country', 'i', 'i')
	self._get_parental_info = self.ref.method('get_parental_info', '', '(iiii)')
	self._time_play = self.ref.method('time_play', 'iiii', 'i')
	self._time_search = self.ref.method('time_search', 'iii', 'i')
	self._set_angle = self.ref.method('set_angle', 'i', 'i')
	self._get_number_of_angle = self.ref.method('get_number_of_angle', 'i', '(ii)')
	self._get_current_angle = self.ref.method('get_current_angle', '', '(ii)')
	self._set_video_output = self.ref.method('set_video_output', 'i', 'i')
	self._is_sub_enabled = self.ref.method('is_sub_enabled', '', '(ii)')
	self._seek_percent = self.ref.method('seek_percent', 'ii', 'i')
	self._set_breakpoint = self.ref.method('set_breakpoint', 'i', 'i')
	self._set_surround = self.ref.method('set_surround', 'i', 'i')
	self.domain = self._domain_type[0]
	self.cur_title = 0
	self.cur_ptt = 0
	self._test = self.ref.method('test', '', 'i')
	return None

def _wss_management(self, param):
	try:
		change_type = (param & 4278190080L) >> 24
		change_val = param & 16777215
		change_type = self._wss_change_type[change_type]
		if change_type == 'DCAWC_NONE':
			print 'DCAWC_NONE'
		else:
			if change_type == 'DCAWC_COPY_MODE':
				change_val = self._copy_mode[change_val]
			else:
				if change_type == 'DCAWC_COPY_PROTECTION':
					change_val = self._copy_protection[change_val]
				else:
					if change_type == 'DCAWC_ANALOGUE_SOURCE_MODE':
						change_val = self._video_analog_source_mode[change_val]
					else:
						if change_type == 'DCAWC_MPEG_PRESENTATION_MODE':
							change_val = self._display_mode_get[change_val]
						else:
							if change_type == 'DCAWC_WSS_ASPECT_RATIO':
								change_val = self._video_presentation_mode[change_val]
							else:
								if change_type == 'DCAWC_FILM_CAMERA_MODE':
									change_val = self._video_film_camera_mode[change_val]
								else:
									if change_type == 'DCAWC_SUBTITLING_MODE':
										change_val = self._video_sub_mode[change_val]

def _event_callback(self, type, param):
	event = {}
	event['type'] = self._event_type[type]
	event['param'] = param
	if event['type'] == 'WYDVD_PLAYBACK_MODE_CHANGE':
		try:
			event['param'] = self._player_mode[param]
		except:
			event['param'] = self._player_mode[0]
	else:
		if event['type'] == 'WYDVD_DOMAIN_CHANGE':
			try:
				event['param'] = self._domain_type[param]
				self.domain = self._domain_type[param]
			except:
				event['param'] = self._domain_type[0]
				self.domain = self._domain_type[0]
		else:
			if event['type'] == 'WYDVD_TITLE_CHANGE':
				event['param'] = param
				self.cur_title = param
			else:
				if event['type'] == 'WYDVD_PART_OF_TITLE_CHANGE':
					event['param'] = param
					self.cur_ptt = param
				else:
					if event['type'] == 'WYDVD_DISPLAY_MODE_CHANGE':
						try:
							event['param'] = self._display_mode_get[param]
						except:
							event['param'] = self._display_mode_get[0]
					else:
						if event['type'] == 'WYDVD_VIDEO_STANDARD_CHANGE':
							try:
								event['param'] = self._video_mode_get[param]
							except:
								event['param'] = self._video_mode_get[0]
						else:
							if event['type'] == 'WYDVD_CGMS_APS_WSS_CHANGE':
								event['param'], event['value'] = self._wss_management(param)

def _ready(self):
	self.ready_event.set()

def register_callback(self, callback):
	self._client_callback = callback

def unregister_callback(self):
	self._client_callback = None
	return None

def stop_wydvd(self):
	self.dbus_thread.stop()
	self.dbus_thread.join()

def _check_error(self, res):
	if res != 0:
		raise WydvdException('wydvd', self._wydvd_error[res], res)

def _call(self, func, *args):
	try:
		ret = func(*args)
	except:
		raise WydvdException('call')
	if isinstance(ret, int):
		self._check_error(ret)
	else:
		self._check_error(ret[0])
		return ret[1:]

def open(self, path=None):
	path = urllib.unquote(path)
	print path
	if not path:
		self._reader = Popen(['wydvd'])
		self._iso = False
	else:
		ss = path.split('://')
		if len(ss) == 1:
			_pre_process = Popen(['ln', '-sf', path, '/dev/loop0'])
		else:
			if ss[0] != 'file':
				raise WydvdException('Unsupported URI type')
			_pre_process = Popen(['ln', '-sf', ss[1], '/dev/loop0'])
		os.waitpid(_pre_process.pid, 0)
		self._reader = Popen(['wydvd', 'iso'])
		self._iso = True
	self.ready_event.wait(15)
	if self.ready_event.isSet():
		self._call(self._open)
		self.ready_event.clear()
	else:
		raise WydvdException('Error Open')

def close(self):
	os.system('kill ' + str(self._reader.pid))
	os.waitpid(self._reader.pid, 0)

def start(self):
	self._call(self._open)

def play(self):
	time.sleep(1)
	self._call(self._play)

def stop(self):
	self._call(self._stop)

def play_title(self, title=1):
	try:
		title = int(title)
	except:
		print 'warning : except. parameter are incorrect'
		title = 1
	self._call(self._play_title, title)

def play_ptt(self, title=1, ptt=1):
	try:
		title = int(title)
		ptt = int(ptt)
	except:
		print 'warning : except. parameter are incorrect'
		title = 1
		ptt = 1
	self._call(self._play_ptt, title, ptt)

def get_number_of_title(self):
	ret = self._call(self._get_number_of_title)
	return ret[0]

def get_number_of_ptt(self, title=1):
	try:
		title = int(title)
	except:
		print 'warning : except. parameter are incorrect'
		title = 1
	ret = self._call(self._get_number_of_ptt, title)
	return ret[0]

def get_volume_name(self):
	ret = self._call(self._get_volume_name)
	return ret[0]

def pause(self):
	self._call(self._pause, True)

def unpause(self):
	self._call(self._pause, False)

def set_speed(self, speed=1):
	try:
		speed = float(speed)
	except:
		print 'warning : except. parameter are incorrect'
		speed = 1
	self._call(self._set_speed, speed)

def set_trickmode(self, speed=1):
	try:
		speed = float(speed)
	except:
		print 'warnin : except parameter are incorrect'
		speed = 1
	print 'ENTERING TRICK MODE'
	self._call(self._set_trickmode, speed)

def get_speed(self):
	ret = self._call(self._get_speed)
	return ret[0]

def get_audio_info(self, audio_stream=0):
	try:
		audio_stream = int(audio_stream)
	except:
		print 'warning : except. parameter are incorrect'
		audio_stream = 0
	ret = self._call(self._get_audio_info, audio_stream)
	info = {}
	if ret[0] != 0:
		info['language'] = chr(ret[0] >> 8) + chr(ret[0] & 255)
	else:
		info['language'] = ''
	if ret[1] != 0:
		info['language_ext'] = chr(ret[1] >> 8) + chr(ret[1] & 255)
	else:
		info['language_ext'] = ''
	if ret[2] < len(self._audio_type):
		info['coding'] = self._audio_type[ret[2]]
	else:
		info['coding'] = 'None'
	info['bitspersample'] = ret[3]
	info['samplespersecond'] = ret[4]
	info['channels'] = ret[5]
	return info

def get_audio_stream(self):
	ret = self._call(self._get_audio_stream)
	return ret[0]

def set_audio_stream(self, audio_stream=0):
	try:
		audio_stream = int(audio_stream)
	except:
		print 'warning : except. parameter are incorrect'
		audio_stream = 0
	self._call(self._set_audio_stream, audio_stream)

def get_sub_stream(self):
	ret = self._call(self._get_sub_stream)
	return ret[0]

def set_sub_stream(self, sub_stream=0, display=True):
	print 'sub_stream',
	print sub_stream
	print 'display',
	print display
	try:
		sub_stream = int(sub_stream)
		if isinstance(display, str):
			if display.lower() == 'true':
				display = True
			else:
				display = False
		else:
			display = bool(display)
	except Exception, e:
		print 'warning : except. parameter are incorrect :',
		print e
		sub_stream = 0
		display = True
	else:
		pass
	self._call(self._set_sub_stream, sub_stream, display)

def set_langage(self, audio_lang='en', sub_lang='en'):
	try:
		if isinstance(audio_lang, str) == False:
			audio_lang = 'en'

def select_menu(self, menu='title'):
	try:
		if isinstance(menu, str) and menu in self._menu_type:
			menu_type = self._menu_type[menu]
		else:
			menu_type = 0

def get_sub_info(self, sub_stream=0):
	try:
		sub_stream = int(sub_stream)
	except:
		print 'warning : except. parameter are incorrect'
		sub_stream = 0
	ret = self._call(self._get_sub_info, sub_stream)
	info = {}
	if ret[0] != 0:
		info['language'] = chr(ret[0] >> 8) + chr(ret[0] & 255)
	else:
		info['language'] = ''
	return info

def get_available_stream(self):
	ret = self._call(self._get_available_stream)
	stream = {}
	stream['nb_audio'] = ret[0]
	stream['nb_sub'] = ret[1]
	return stream

def action_button(self, action='activate', num_button=0):
	print 'action_button ',
	print action
	print 'num_button ',
	print num_button
	try:
		if isinstance(action, str) and action in self._action_type:
			action_type = self._action_type[action]
		else:
			action_type = self._action_type['activate']

def get_button_info(self):
	ret = self._call(self._get_button_info)
	button = {}
	button['min'] = ret[0]
	button['nb'] = ret[1]
	button['current'] = ret[2]
	return button

def set_display_mode(self, display_mode='4_3'):
	try:
		if isinstance(display_mode, str) and display_mode in self._display_mode_set:
			display_type = self._display_mode_set[display_mode]
		else:
			display_type = 0

def get_display_mode(self):
	ret = self._call(self._get_display_mode)
	return self._display_mode_get[ret[0]]

def get_ptt_location(self):
	ret = self._call(self._get_ptt_location)
	info = {}
	info['num'] = ret[0]
	info['hours'] = ret[1]
	info['minutes'] = ret[2]
	info['seconds'] = ret[3]
	return info

def get_ptt_duration(self):
	ret = self._call(self._get_ptt_duration)
	info = {}
	info['num'] = ret[0]
	info['hours'] = ret[1]
	info['minutes'] = ret[2]
	info['seconds'] = ret[3]
	return info

def get_title_location(self):
	ret = self._call(self._get_title_location)
	info = {}
	info['num'] = ret[0]
	info['hours'] = ret[1]
	info['minutes'] = ret[2]
	info['seconds'] = ret[3]
	return info

def get_title_duration(self):
	ret = self._call(self._get_title_duration)
	info = {}
	info['num'] = ret[0]
	info['hours'] = ret[1]
	info['minutes'] = ret[2]
	info['seconds'] = ret[3]
	return info

def set_menu_langage(self, menu_lang='en'):
	try:
		if isinstance(menu_lang, str) == False:
			menu_lang = 'en'

def next_chapter(self):
	self._call(self._next_chapter)

def previous_chapter(self):
	self._call(self._previous_chapter)

def get_player_mode(self):
	ret = self._call(self._get_player_mode)
	return self._player_mode[ret[0]]

def check_menu_available(self, menu='title'):
	try:
		if isinstance(menu, str) and menu in self._menu_type:
			menu_type = self._menu_type[menu]
		else:
			menu_type = 0

def resume(self):
	self._call(self._resume)

def set_parental_level(self, level=1):
	try:
		level = int(level)
	except:
		print 'warning : except. parameter are incorrect'
		level = 1
	self._call(self._set_parental_level, level)

def set_parental_country(self, country=1):
	try:
		country = int(country)
	except:
		print 'warning : except. parameter are incorrect'
		country = 1
	self._call(self._set_parental_country, country)

def get_parental_info(self):
	ret = self._call(self._get_parental_info)
	info = {}
	info['level'] = ret[0]
	info['country'] = ret[1]
	info['is_parental'] = ret[2]
	return info

def time_play(self, title=1, hours=0, minutes=0, seconds=0):
	try:
		title = int(title)
		hours = int(hours)
		minutes = int(minutes)
		seconds = int(seconds)
	except:
		print 'warning : except. parameter are incorrect'
		title = 1
		hours = 0
		minutes = 0
		seconds = 0
	self._call(self._time_play, title, hours, minutes, seconds)

def time_search(self, hours=0, minutes=0, seconds=0):
	try:
		hours = int(hours)
		minutes = int(minutes)
		seconds = int(seconds)
	except:
		print 'warning : except. parameter are incorrect'
		hours = 0
		minutes = 0
		seconds = 0
	self._call(self._time_search, hours, minutes, seconds)

def set_angle(self, angle=0):
	try:
		angle = int(angle)
	except:
		print 'warning : except. parameter are incorrect'
		angle = 1
	self._call(self._set_angle, angle)

def get_number_of_angle(self, title=1):
	try:
		title = int(title)
	except:
		print 'warning : except. parameter are incorrect'
		title = 1
	ret = self._call(self._get_number_of_angle, title)
	return ret[0]

def get_current_angle(self):
	ret = self._call(self._get_current_angle)
	return ret[0]

def set_video_output(self, video='NONE'):
	try:
		if isinstance(video, str) and video in self._video_mode_set:
			video_mode = self._video_mode_set[video]
		else:
			video_mode = 0

def is_sub_enabled(self):
	ret = self._call(self._is_sub_enabled)
	return bool(ret[0])

def seek_percent(self, direction=1):
	try:
		direction = int(direction)
	except:
		print 'warning : except. parameter are incorrect'
		direction = 1
	self._call(self._seek_percent, 10, direction)

def set_breakpoint(self):
	self._call(self._set_breakpoint)

_Wydvd__doc_spdif_surround = 'enable or disable sending raw surround data to the SP/DIF output.    \n    if False, send PCM audio data.\n    if True, send raw undecoded audio frames. may be AC3, DTS, or\n    any audio codec supported by an external amplifier connected\n    through SP/DIF or HDMI.\n    '
def set_surround(self, enable):
	if enable not in (False, True):
		pass
	self._set_surround(int(enable))

spdif_surround = property(fset=set_surround, doc=_Wydvd__doc_spdif_surround)
def test(self):
	self._call(self._test)

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb76d2f8c>}
nname: 0
n 0(None)[from wydbus import WyDbus, WDB_AS_THREAD
from threading import Thread, Event
import os
import time
import urllib
from subprocess import Popen
__all__ = ['Wydvd', 'WydvdException']
class WydvdDbusThread(Thread):
	def __init__(self, dbus):
		Thread.__init__(self)
		self.dbus = dbus
		self.user_stop = False

	def __del__(self):
		self.stop()

	def stop(self):
		self.user_stop = True

	def run(self):
		while self.user_stop == False:
			self.dbus.step()



class WydvdException(Exception):
	pass

class Wydvd(object):
	__doc__ = "WyDVD client interface.\n\n    Example usage:\n\n    >> from wydvd import Wydvd\n    >> wdd = Wydvd()\n    >> wdd.open('/media/DVD-ISO/Orgazmo.iso')\n    >> wdd.play()\n    >> wdd.stop()\n    >> wdd.close()    \n\n    State for documentation:\n    \n    "
	_dbus_name = 'com.wyplay.wydvd'
	_dbus_path = '/com/wyplay/WyDVD'
	_domain_type = ('FIRST_PLAY', 'VIDEO_MANAGER_MENU', 'VTS_MENU', 'TITLE', 'STOP', 'AMGM_DOM', 'TT_GR_DOM')
	_player_mode = ('DEFAULT', 'STOPPED', 'PAUSED', 'STILL', 'PLAYING', 'BUSY', 'SCANNING', 'INACTIVE', 'REVERSEPLAY', 'TRICKPLAY', 'REVERSESCAN')
	_event_type = ('WYDVD_TITLE_CHANGE', 'WYDVD_PART_OF_TITLE_CHANGE', 'WYDVD_VALID_UOP_CHANGE', 'WYDVD_ANGLE_CHANGE', 'WYDVD_AUDIO_STREAM_CHANGE', 'WYDVD_SUBPICTURE_STREAM_CHANGE', 'WYDVD_DOMAIN_CHANGE', 'WYDVD_PARENTAL_LEVEL_CHANGE', 'WYDVD_BITRATE_CHANGE', 'WYDVD_STILL_ON', 'WYDVD_STILL_OFF', 'WYDVD_PLAYBACK_MODE_CHANGE', 'WYDVD_READ_ERROR', 'WYDVD_DISPLAY_MODE_CHANGE', 'WYDVD_STREAMS_CHANGE', 'WYDVD_PLAYBACK_SPEED_CHANGE', 'WYDVD_VIDEO_STANDARD_CHANGE', 'WYDVD_BREAKPOINT_REACHED', 'WYDVD_ERROR', 'WYDVD_NAV_COMMAND_EXEC', 'WYDVD_SEARCH_COMPLETE', 'WYDVD_NAVIGATION_MODE_CHANGE', 'WYDVD_IMAGE_DECODE_COMPLETE', 'WYDVD_CGMS_APS_WSS_CHANGE', 'WYDVD_UNKNOWN')
	_audio_type = ('AC3', 'MPEG1', 'MPEG2', 'LPCM', 'DTS', 'SDDS', 'WMA', 'DSD', 'MLP')
	_menu_type = dict(title=0, root=1, sub=2, audio=3, angle=4, ptt=5)
	_action_type = dict(up=0, down=1, right=2, left=3, activate=4, select_activate=5)
	_display_mode_set = {'4_3': 0, '16_9': 1, 'letterbox': 2, 'panscan': 3, 'none': 4, '4_3_letterbox': 5}
	_display_mode_get = ('4_3', '16_9', 'letterbox', 'panscan', 'none', '4_3_letterbox')
	_video_mode_set = {'NONE': 0, 'PAL': 1, 'NTSC': 2}
	_video_mode_get = ('NONE', 'PAL', 'NTSC')
	_reader = None
	_wss_change_type = ('DCAWC_NONE', 'DCAWC_COPY_MODE', 'DCAWC_COPY_PROTECTION', 'DCAWC_ANALOGUE_SOURCE_MODE', 'DCAWC_MPEG_PRESENTATION_MODE', 'DCAWC_WSS_ASPECT_RATIO', 'DCAWC_FILM_CAMERA_MODE', 'DCAWC_SUBTITLING_MODE')
	_copy_mode = ('VCPMD_INVALID', 'VCPMD_UNKNOWN,VCPMD_DEFAULT', 'VCPMD_COPYING_PERMITTED', 'VCPMD_ONE_COPY_PERMITTED', 'VCPMD_NO_COPYING_PERMITTED', 'VCPMD_NUMBER')
	_copy_protection = ('VCP_OFF', 'VCP_STAGE1', 'VCP_STAGE2', 'VCP_STAGE3')
	_video_analog_source_mode = ('VASMD_DEFAULT', 'VASMD_ANALOGUE_PRE_RECORDED', 'VASMD_NOT_ANALOGUE_PRE_RECORDED')
	_video_presentation_mode = ('VPRM_INVALID', 'VPRM_UNKNOWN', 'VPRM_4_BY_3_NORMAL', 'VPRM_4_BY_3_FULL', 'VPRM_4_BY_3_LETTERBOXED', 'VPRM_16_BY_9_ANAMORPHIC', 'VPRM_14_BY_9_LETTERBOXED_CENTER', 'VPRM_14_BY_9_LETTERBOXED_TOP', 'VPRM_16_BY_9_LETTERBOXED_TOP', 'VPRM_LARGE_16_BY_9_LETTERBOXED_CENTER', 'VPRM_14_BY_9_ANAMORPHIC', 'VPRM_RESERVED', 'VPRM_NUMBER')
	_video_film_camera_mode = ('VFCMD_DEFAULT', 'VFCMD_CAMERA', 'VFCMD_FILM')
	_video_sub_mode = ('VSTM_DEFAULT', 'VSTM_NO_SUBTITLE', 'VSTM_INSIDE_ACTIVE_PICTURE', 'VSTM_OUTSIDE_ACTIVE_PICTURE')
	_wydvd_error = ('WYDVD_OK', 'WYDVD_ERROR', 'WYDVD_NOT_ENOUGH_MEMORY', 'WYDVD_UOP_PROHIBITED', 'WYDVD_NO_RESUME_INFORMATION', 'WYDVD_TITLE_NOT_FOUND', 'WYDVD_RANGE_VIOLATION', 'WYDVD_INVALID_PARAMETERS', 'WYDVD_OBJECT_NOT_FOUND', 'WYDVD_PARENTAL_LEVEL_TOO_LOW', 'WYDVD_OPERATION_NOT_SUPPORTED', 'WYDVD_UNIMPLEMENTED', 'WYDVD_BUTTON_NOT_FOUND', 'WYDVD_NO_FIRST_PLAY_PGC', 'WYDVD_UNEXPECTED_NAVIGATION_ERROR', 'WYDVD_OBJECT_EMPTY', 'WYDVD_OBJECT_IN_USE', 'WYDVD_INVALID_CONFIGURE_STATE', 'WYDVD_OPERATION_PROHIBITED')
	def __init__(self, dbus=None):
		self._client_callback = None
		self._iso = False
		if dbus:
			self.wdb = dbus
			self.ref = self.wdb.reference(self._dbus_name, self._dbus_path)
			self.event_inst = self.wdb.instance(self._dbus_path)
		else:
			self.wdb_client = WyDbus('com.wyplay.wyplay_client', system=True)
			self.ref = self.wdb_client.reference(self._dbus_name, self._dbus_path)
			self.event_inst = self.wdb_client.instance(self._dbus_path)
		self.event_inst.signal('event_callback', 'ii', self._event_callback, WDB_AS_THREAD)
		self.event_inst.signal('ready', '', self._ready, WDB_AS_THREAD)
		self.ready_event = Event()
		self._open = self.ref.method('open', '', 'i')
		self._close = self.ref.method('close', '', 'i')
		self._play = self.ref.method('play', '', 'i')
		self._stop = self.ref.method('stop', '', 'i')
		self._play_title = self.ref.method('play_title', 'i', 'i')
		self._play_ptt = self.ref.method('play_ptt', 'ii', 'i')
		self._get_number_of_title = self.ref.method('get_number_of_title', '', '(ii)')
		self._get_number_of_ptt = self.ref.method('get_number_of_ptt', 'i', '(ii)')
		self._get_volume_name = self.ref.method('get_volume_name', '', '(is)')
		self._get_audio_stream = self.ref.method('get_audio_stream', '', '(ii)')
		self._set_audio_stream = self.ref.method('set_audio_stream', 'i', 'i')
		self._get_sub_stream = self.ref.method('get_sub_stream', '', '(ii)')
		self._set_sub_stream = self.ref.method('set_sub_stream', 'ib', 'i')
		self._pause = self.ref.method('pause', 'b', 'i')
		self._set_speed = self.ref.method('set_speed', 'd', 'i')
		self._set_trickmode = self.ref.method('set_trickmode', 'd', 'i')
		self._get_speed = self.ref.method('get_speed', '', '(id)')
		self._get_audio_info = self.ref.method('get_audio_info', 'i', '(iiiiiiiiiiiii)')
		self._get_sub_info = self.ref.method('get_sub_info', 'i', '(iii)')
		self._set_langage = self.ref.method('set_langage', 'iiii', 'i')
		self._select_menu = self.ref.method('select_menu', 'i', 'i')
		self._get_available_stream = self.ref.method('get_available_stream', '', '(iii)')
		self._action_button = self.ref.method('action_button', 'ii', 'i')
		self._get_button_info = self.ref.method('get_button_info', '', '(iiii)')
		self._set_display_mode = self.ref.method('set_display_mode', 'i', 'i')
		self._get_display_mode = self.ref.method('get_display_mode', '', '(ii)')
		self._get_ptt_location = self.ref.method('get_ptt_location', '', '(iiiii)')
		self._get_title_location = self.ref.method('get_title_location', '', '(iiiii)')
		self._get_ptt_duration = self.ref.method('get_ptt_duration', '', '(iiiii)')
		self._get_title_duration = self.ref.method('get_title_duration', '', '(iiiii)')
		self._set_menu_langage = self.ref.method('set_menu_langage', 'i', 'i')
		self._next_chapter = self.ref.method('next_chapter', '', 'i')
		self._previous_chapter = self.ref.method('previous_chapter', '', 'i')
		self._get_player_mode = self.ref.method('get_player_mode', '', '(ii)')
		self._check_menu_available = self.ref.method('check_menu_available', 'i', '(ii)')
		self._resume = self.ref.method('resume', '', 'i')
		self._set_parental_level = self.ref.method('set_parental_level', 'i', 'i')
		self._set_parental_country = self.ref.method('set_parental_country', 'i', 'i')
		self._get_parental_info = self.ref.method('get_parental_info', '', '(iiii)')
		self._time_play = self.ref.method('time_play', 'iiii', 'i')
		self._time_search = self.ref.method('time_search', 'iii', 'i')
		self._set_angle = self.ref.method('set_angle', 'i', 'i')
		self._get_number_of_angle = self.ref.method('get_number_of_angle', 'i', '(ii)')
		self._get_current_angle = self.ref.method('get_current_angle', '', '(ii)')
		self._set_video_output = self.ref.method('set_video_output', 'i', 'i')
		self._is_sub_enabled = self.ref.method('is_sub_enabled', '', '(ii)')
		self._seek_percent = self.ref.method('seek_percent', 'ii', 'i')
		self._set_breakpoint = self.ref.method('set_breakpoint', 'i', 'i')
		self._set_surround = self.ref.method('set_surround', 'i', 'i')
		self.domain = self._domain_type[0]
		self.cur_title = 0
		self.cur_ptt = 0
		self._test = self.ref.method('test', '', 'i')
		return None

	def _wss_management(self, param):
		try:
			change_type = (param & 4278190080L) >> 24
			change_val = param & 16777215
			change_type = self._wss_change_type[change_type]
			if change_type == 'DCAWC_NONE':
				print 'DCAWC_NONE'
			else:
				if change_type == 'DCAWC_COPY_MODE':
					change_val = self._copy_mode[change_val]
				else:
					if change_type == 'DCAWC_COPY_PROTECTION':
						change_val = self._copy_protection[change_val]
					else:
						if change_type == 'DCAWC_ANALOGUE_SOURCE_MODE':
							change_val = self._video_analog_source_mode[change_val]
						else:
							if change_type == 'DCAWC_MPEG_PRESENTATION_MODE':
								change_val = self._display_mode_get[change_val]
							else:
								if change_type == 'DCAWC_WSS_ASPECT_RATIO':
									change_val = self._video_presentation_mode[change_val]
								else:
									if change_type == 'DCAWC_FILM_CAMERA_MODE':
										change_val = self._video_film_camera_mode[change_val]
									else:
										if change_type == 'DCAWC_SUBTITLING_MODE':
											change_val = self._video_sub_mode[change_val]

	def _event_callback(self, type, param):
		event = {}
		event['type'] = self._event_type[type]
		event['param'] = param
		if event['type'] == 'WYDVD_PLAYBACK_MODE_CHANGE':
			try:
				event['param'] = self._player_mode[param]
			except:
				event['param'] = self._player_mode[0]
		else:
			if event['type'] == 'WYDVD_DOMAIN_CHANGE':
				try:
					event['param'] = self._domain_type[param]
					self.domain = self._domain_type[param]
				except:
					event['param'] = self._domain_type[0]
					self.domain = self._domain_type[0]
			else:
				if event['type'] == 'WYDVD_TITLE_CHANGE':
					event['param'] = param
					self.cur_title = param
				else:
					if event['type'] == 'WYDVD_PART_OF_TITLE_CHANGE':
						event['param'] = param
						self.cur_ptt = param
					else:
						if event['type'] == 'WYDVD_DISPLAY_MODE_CHANGE':
							try:
								event['param'] = self._display_mode_get[param]
							except:
								event['param'] = self._display_mode_get[0]
						else:
							if event['type'] == 'WYDVD_VIDEO_STANDARD_CHANGE':
								try:
									event['param'] = self._video_mode_get[param]
								except:
									event['param'] = self._video_mode_get[0]
							else:
								if event['type'] == 'WYDVD_CGMS_APS_WSS_CHANGE':
									event['param'], event['value'] = self._wss_management(param)

	def _ready(self):
		self.ready_event.set()

	def register_callback(self, callback):
		self._client_callback = callback

	def unregister_callback(self):
		self._client_callback = None
		return None

	def stop_wydvd(self):
		self.dbus_thread.stop()
		self.dbus_thread.join()

	def _check_error(self, res):
		if res != 0:
			raise WydvdException('wydvd', self._wydvd_error[res], res)

	def _call(self, func, *args):
		try:
			ret = func(*args)
		except:
			raise WydvdException('call')
		if isinstance(ret, int):
			self._check_error(ret)
		else:
			self._check_error(ret[0])
			return ret[1:]

	def open(self, path=None):
		path = urllib.unquote(path)
		print path
		if not path:
			self._reader = Popen(['wydvd'])
			self._iso = False
		else:
			ss = path.split('://')
			if len(ss) == 1:
				_pre_process = Popen(['ln', '-sf', path, '/dev/loop0'])
			else:
				if ss[0] != 'file':
					raise WydvdException('Unsupported URI type')
				_pre_process = Popen(['ln', '-sf', ss[1], '/dev/loop0'])
			os.waitpid(_pre_process.pid, 0)
			self._reader = Popen(['wydvd', 'iso'])
			self._iso = True
		self.ready_event.wait(15)
		if self.ready_event.isSet():
			self._call(self._open)
			self.ready_event.clear()
		else:
			raise WydvdException('Error Open')

	def close(self):
		os.system('kill ' + str(self._reader.pid))
		os.waitpid(self._reader.pid, 0)

	def start(self):
		self._call(self._open)

	def play(self):
		time.sleep(1)
		self._call(self._play)

	def stop(self):
		self._call(self._stop)

	def play_title(self, title=1):
		try:
			title = int(title)
		except:
			print 'warning : except. parameter are incorrect'
			title = 1
		self._call(self._play_title, title)

	def play_ptt(self, title=1, ptt=1):
		try:
			title = int(title)
			ptt = int(ptt)
		except:
			print 'warning : except. parameter are incorrect'
			title = 1
			ptt = 1
		self._call(self._play_ptt, title, ptt)

	def get_number_of_title(self):
		ret = self._call(self._get_number_of_title)
		return ret[0]

	def get_number_of_ptt(self, title=1):
		try:
			title = int(title)
		except:
			print 'warning : except. parameter are incorrect'
			title = 1
		ret = self._call(self._get_number_of_ptt, title)
		return ret[0]

	def get_volume_name(self):
		ret = self._call(self._get_volume_name)
		return ret[0]

	def pause(self):
		self._call(self._pause, True)

	def unpause(self):
		self._call(self._pause, False)

	def set_speed(self, speed=1):
		try:
			speed = float(speed)
		except:
			print 'warning : except. parameter are incorrect'
			speed = 1
		self._call(self._set_speed, speed)

	def set_trickmode(self, speed=1):
		try:
			speed = float(speed)
		except:
			print 'warnin : except parameter are incorrect'
			speed = 1
		print 'ENTERING TRICK MODE'
		self._call(self._set_trickmode, speed)

	def get_speed(self):
		ret = self._call(self._get_speed)
		return ret[0]

	def get_audio_info(self, audio_stream=0):
		try:
			audio_stream = int(audio_stream)
		except:
			print 'warning : except. parameter are incorrect'
			audio_stream = 0
		ret = self._call(self._get_audio_info, audio_stream)
		info = {}
		if ret[0] != 0:
			info['language'] = chr(ret[0] >> 8) + chr(ret[0] & 255)
		else:
			info['language'] = ''
		if ret[1] != 0:
			info['language_ext'] = chr(ret[1] >> 8) + chr(ret[1] & 255)
		else:
			info['language_ext'] = ''
		if ret[2] < len(self._audio_type):
			info['coding'] = self._audio_type[ret[2]]
		else:
			info['coding'] = 'None'
		info['bitspersample'] = ret[3]
		info['samplespersecond'] = ret[4]
		info['channels'] = ret[5]
		return info

	def get_audio_stream(self):
		ret = self._call(self._get_audio_stream)
		return ret[0]

	def set_audio_stream(self, audio_stream=0):
		try:
			audio_stream = int(audio_stream)
		except:
			print 'warning : except. parameter are incorrect'
			audio_stream = 0
		self._call(self._set_audio_stream, audio_stream)

	def get_sub_stream(self):
		ret = self._call(self._get_sub_stream)
		return ret[0]

	def set_sub_stream(self, sub_stream=0, display=True):
		print 'sub_stream',
		print sub_stream
		print 'display',
		print display
		try:
			sub_stream = int(sub_stream)
			if isinstance(display, str):
				if display.lower() == 'true':
					display = True
				else:
					display = False
			else:
				display = bool(display)
		except Exception, e:
			print 'warning : except. parameter are incorrect :',
			print e
			sub_stream = 0
			display = True
		else:
			pass
		self._call(self._set_sub_stream, sub_stream, display)

	def set_langage(self, audio_lang='en', sub_lang='en'):
		try:
			if isinstance(audio_lang, str) == False:
				audio_lang = 'en'

	def select_menu(self, menu='title'):
		try:
			if isinstance(menu, str) and menu in self._menu_type:
				menu_type = self._menu_type[menu]
			else:
				menu_type = 0

	def get_sub_info(self, sub_stream=0):
		try:
			sub_stream = int(sub_stream)
		except:
			print 'warning : except. parameter are incorrect'
			sub_stream = 0
		ret = self._call(self._get_sub_info, sub_stream)
		info = {}
		if ret[0] != 0:
			info['language'] = chr(ret[0] >> 8) + chr(ret[0] & 255)
		else:
			info['language'] = ''
		return info

	def get_available_stream(self):
		ret = self._call(self._get_available_stream)
		stream = {}
		stream['nb_audio'] = ret[0]
		stream['nb_sub'] = ret[1]
		return stream

	def action_button(self, action='activate', num_button=0):
		print 'action_button ',
		print action
		print 'num_button ',
		print num_button
		try:
			if isinstance(action, str) and action in self._action_type:
				action_type = self._action_type[action]
			else:
				action_type = self._action_type['activate']

	def get_button_info(self):
		ret = self._call(self._get_button_info)
		button = {}
		button['min'] = ret[0]
		button['nb'] = ret[1]
		button['current'] = ret[2]
		return button

	def set_display_mode(self, display_mode='4_3'):
		try:
			if isinstance(display_mode, str) and display_mode in self._display_mode_set:
				display_type = self._display_mode_set[display_mode]
			else:
				display_type = 0

	def get_display_mode(self):
		ret = self._call(self._get_display_mode)
		return self._display_mode_get[ret[0]]

	def get_ptt_location(self):
		ret = self._call(self._get_ptt_location)
		info = {}
		info['num'] = ret[0]
		info['hours'] = ret[1]
		info['minutes'] = ret[2]
		info['seconds'] = ret[3]
		return info

	def get_ptt_duration(self):
		ret = self._call(self._get_ptt_duration)
		info = {}
		info['num'] = ret[0]
		info['hours'] = ret[1]
		info['minutes'] = ret[2]
		info['seconds'] = ret[3]
		return info

	def get_title_location(self):
		ret = self._call(self._get_title_location)
		info = {}
		info['num'] = ret[0]
		info['hours'] = ret[1]
		info['minutes'] = ret[2]
		info['seconds'] = ret[3]
		return info

	def get_title_duration(self):
		ret = self._call(self._get_title_duration)
		info = {}
		info['num'] = ret[0]
		info['hours'] = ret[1]
		info['minutes'] = ret[2]
		info['seconds'] = ret[3]
		return info

	def set_menu_langage(self, menu_lang='en'):
		try:
			if isinstance(menu_lang, str) == False:
				menu_lang = 'en'

	def next_chapter(self):
		self._call(self._next_chapter)

	def previous_chapter(self):
		self._call(self._previous_chapter)

	def get_player_mode(self):
		ret = self._call(self._get_player_mode)
		return self._player_mode[ret[0]]

	def check_menu_available(self, menu='title'):
		try:
			if isinstance(menu, str) and menu in self._menu_type:
				menu_type = self._menu_type[menu]
			else:
				menu_type = 0

	def resume(self):
		self._call(self._resume)

	def set_parental_level(self, level=1):
		try:
			level = int(level)
		except:
			print 'warning : except. parameter are incorrect'
			level = 1
		self._call(self._set_parental_level, level)

	def set_parental_country(self, country=1):
		try:
			country = int(country)
		except:
			print 'warning : except. parameter are incorrect'
			country = 1
		self._call(self._set_parental_country, country)

	def get_parental_info(self):
		ret = self._call(self._get_parental_info)
		info = {}
		info['level'] = ret[0]
		info['country'] = ret[1]
		info['is_parental'] = ret[2]
		return info

	def time_play(self, title=1, hours=0, minutes=0, seconds=0):
		try:
			title = int(title)
			hours = int(hours)
			minutes = int(minutes)
			seconds = int(seconds)
		except:
			print 'warning : except. parameter are incorrect'
			title = 1
			hours = 0
			minutes = 0
			seconds = 0
		self._call(self._time_play, title, hours, minutes, seconds)

	def time_search(self, hours=0, minutes=0, seconds=0):
		try:
			hours = int(hours)
			minutes = int(minutes)
			seconds = int(seconds)
		except:
			print 'warning : except. parameter are incorrect'
			hours = 0
			minutes = 0
			seconds = 0
		self._call(self._time_search, hours, minutes, seconds)

	def set_angle(self, angle=0):
		try:
			angle = int(angle)
		except:
			print 'warning : except. parameter are incorrect'
			angle = 1
		self._call(self._set_angle, angle)

	def get_number_of_angle(self, title=1):
		try:
			title = int(title)
		except:
			print 'warning : except. parameter are incorrect'
			title = 1
		ret = self._call(self._get_number_of_angle, title)
		return ret[0]

	def get_current_angle(self):
		ret = self._call(self._get_current_angle)
		return ret[0]

	def set_video_output(self, video='NONE'):
		try:
			if isinstance(video, str) and video in self._video_mode_set:
				video_mode = self._video_mode_set[video]
			else:
				video_mode = 0

	def is_sub_enabled(self):
		ret = self._call(self._is_sub_enabled)
		return bool(ret[0])

	def seek_percent(self, direction=1):
		try:
			direction = int(direction)
		except:
			print 'warning : except. parameter are incorrect'
			direction = 1
		self._call(self._seek_percent, 10, direction)

	def set_breakpoint(self):
		self._call(self._set_breakpoint)

	_Wydvd__doc_spdif_surround = 'enable or disable sending raw surround data to the SP/DIF output.    \n    if False, send PCM audio data.\n    if True, send raw undecoded audio frames. may be AC3, DTS, or\n    any audio codec supported by an external amplifier connected\n    through SP/DIF or HDMI.\n    '
	def set_surround(self, enable):
		if enable not in (False, True):
			pass
		self._set_surround(int(enable))

	spdif_surround = property(fset=set_surround, doc=_Wydvd__doc_spdif_surround)
	def test(self):
		self._call(self._test)



]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76c158c>}
from wydbus import WyDbus, WDB_AS_THREAD
from threading import Thread, Event
import os
import time
import urllib
from subprocess import Popen
__all__ = ['Wydvd', 'WydvdException']
class WydvdDbusThread(Thread):
	def __init__(self, dbus):
		Thread.__init__(self)
		self.dbus = dbus
		self.user_stop = False

	def __del__(self):
		self.stop()

	def stop(self):
		self.user_stop = True

	def run(self):
		while self.user_stop == False:
			self.dbus.step()



class WydvdException(Exception):
	pass

class Wydvd(object):
	__doc__ = "WyDVD client interface.\n\n    Example usage:\n\n    >> from wydvd import Wydvd\n    >> wdd = Wydvd()\n    >> wdd.open('/media/DVD-ISO/Orgazmo.iso')\n    >> wdd.play()\n    >> wdd.stop()\n    >> wdd.close()    \n\n    State for documentation:\n    \n    "
	_dbus_name = 'com.wyplay.wydvd'
	_dbus_path = '/com/wyplay/WyDVD'
	_domain_type = ('FIRST_PLAY', 'VIDEO_MANAGER_MENU', 'VTS_MENU', 'TITLE', 'STOP', 'AMGM_DOM', 'TT_GR_DOM')
	_player_mode = ('DEFAULT', 'STOPPED', 'PAUSED', 'STILL', 'PLAYING', 'BUSY', 'SCANNING', 'INACTIVE', 'REVERSEPLAY', 'TRICKPLAY', 'REVERSESCAN')
	_event_type = ('WYDVD_TITLE_CHANGE', 'WYDVD_PART_OF_TITLE_CHANGE', 'WYDVD_VALID_UOP_CHANGE', 'WYDVD_ANGLE_CHANGE', 'WYDVD_AUDIO_STREAM_CHANGE', 'WYDVD_SUBPICTURE_STREAM_CHANGE', 'WYDVD_DOMAIN_CHANGE', 'WYDVD_PARENTAL_LEVEL_CHANGE', 'WYDVD_BITRATE_CHANGE', 'WYDVD_STILL_ON', 'WYDVD_STILL_OFF', 'WYDVD_PLAYBACK_MODE_CHANGE', 'WYDVD_READ_ERROR', 'WYDVD_DISPLAY_MODE_CHANGE', 'WYDVD_STREAMS_CHANGE', 'WYDVD_PLAYBACK_SPEED_CHANGE', 'WYDVD_VIDEO_STANDARD_CHANGE', 'WYDVD_BREAKPOINT_REACHED', 'WYDVD_ERROR', 'WYDVD_NAV_COMMAND_EXEC', 'WYDVD_SEARCH_COMPLETE', 'WYDVD_NAVIGATION_MODE_CHANGE', 'WYDVD_IMAGE_DECODE_COMPLETE', 'WYDVD_CGMS_APS_WSS_CHANGE', 'WYDVD_UNKNOWN')
	_audio_type = ('AC3', 'MPEG1', 'MPEG2', 'LPCM', 'DTS', 'SDDS', 'WMA', 'DSD', 'MLP')
	_menu_type = dict(title=0, root=1, sub=2, audio=3, angle=4, ptt=5)
	_action_type = dict(up=0, down=1, right=2, left=3, activate=4, select_activate=5)
	_display_mode_set = {'4_3': 0, '16_9': 1, 'letterbox': 2, 'panscan': 3, 'none': 4, '4_3_letterbox': 5}
	_display_mode_get = ('4_3', '16_9', 'letterbox', 'panscan', 'none', '4_3_letterbox')
	_video_mode_set = {'NONE': 0, 'PAL': 1, 'NTSC': 2}
	_video_mode_get = ('NONE', 'PAL', 'NTSC')
	_reader = None
	_wss_change_type = ('DCAWC_NONE', 'DCAWC_COPY_MODE', 'DCAWC_COPY_PROTECTION', 'DCAWC_ANALOGUE_SOURCE_MODE', 'DCAWC_MPEG_PRESENTATION_MODE', 'DCAWC_WSS_ASPECT_RATIO', 'DCAWC_FILM_CAMERA_MODE', 'DCAWC_SUBTITLING_MODE')
	_copy_mode = ('VCPMD_INVALID', 'VCPMD_UNKNOWN,VCPMD_DEFAULT', 'VCPMD_COPYING_PERMITTED', 'VCPMD_ONE_COPY_PERMITTED', 'VCPMD_NO_COPYING_PERMITTED', 'VCPMD_NUMBER')
	_copy_protection = ('VCP_OFF', 'VCP_STAGE1', 'VCP_STAGE2', 'VCP_STAGE3')
	_video_analog_source_mode = ('VASMD_DEFAULT', 'VASMD_ANALOGUE_PRE_RECORDED', 'VASMD_NOT_ANALOGUE_PRE_RECORDED')
	_video_presentation_mode = ('VPRM_INVALID', 'VPRM_UNKNOWN', 'VPRM_4_BY_3_NORMAL', 'VPRM_4_BY_3_FULL', 'VPRM_4_BY_3_LETTERBOXED', 'VPRM_16_BY_9_ANAMORPHIC', 'VPRM_14_BY_9_LETTERBOXED_CENTER', 'VPRM_14_BY_9_LETTERBOXED_TOP', 'VPRM_16_BY_9_LETTERBOXED_TOP', 'VPRM_LARGE_16_BY_9_LETTERBOXED_CENTER', 'VPRM_14_BY_9_ANAMORPHIC', 'VPRM_RESERVED', 'VPRM_NUMBER')
	_video_film_camera_mode = ('VFCMD_DEFAULT', 'VFCMD_CAMERA', 'VFCMD_FILM')
	_video_sub_mode = ('VSTM_DEFAULT', 'VSTM_NO_SUBTITLE', 'VSTM_INSIDE_ACTIVE_PICTURE', 'VSTM_OUTSIDE_ACTIVE_PICTURE')
	_wydvd_error = ('WYDVD_OK', 'WYDVD_ERROR', 'WYDVD_NOT_ENOUGH_MEMORY', 'WYDVD_UOP_PROHIBITED', 'WYDVD_NO_RESUME_INFORMATION', 'WYDVD_TITLE_NOT_FOUND', 'WYDVD_RANGE_VIOLATION', 'WYDVD_INVALID_PARAMETERS', 'WYDVD_OBJECT_NOT_FOUND', 'WYDVD_PARENTAL_LEVEL_TOO_LOW', 'WYDVD_OPERATION_NOT_SUPPORTED', 'WYDVD_UNIMPLEMENTED', 'WYDVD_BUTTON_NOT_FOUND', 'WYDVD_NO_FIRST_PLAY_PGC', 'WYDVD_UNEXPECTED_NAVIGATION_ERROR', 'WYDVD_OBJECT_EMPTY', 'WYDVD_OBJECT_IN_USE', 'WYDVD_INVALID_CONFIGURE_STATE', 'WYDVD_OPERATION_PROHIBITED')
	def __init__(self, dbus=None):
		self._client_callback = None
		self._iso = False
		if dbus:
			self.wdb = dbus
			self.ref = self.wdb.reference(self._dbus_name, self._dbus_path)
			self.event_inst = self.wdb.instance(self._dbus_path)
		else:
			self.wdb_client = WyDbus('com.wyplay.wyplay_client', system=True)
			self.ref = self.wdb_client.reference(self._dbus_name, self._dbus_path)
			self.event_inst = self.wdb_client.instance(self._dbus_path)
		self.event_inst.signal('event_callback', 'ii', self._event_callback, WDB_AS_THREAD)
		self.event_inst.signal('ready', '', self._ready, WDB_AS_THREAD)
		self.ready_event = Event()
		self._open = self.ref.method('open', '', 'i')
		self._close = self.ref.method('close', '', 'i')
		self._play = self.ref.method('play', '', 'i')
		self._stop = self.ref.method('stop', '', 'i')
		self._play_title = self.ref.method('play_title', 'i', 'i')
		self._play_ptt = self.ref.method('play_ptt', 'ii', 'i')
		self._get_number_of_title = self.ref.method('get_number_of_title', '', '(ii)')
		self._get_number_of_ptt = self.ref.method('get_number_of_ptt', 'i', '(ii)')
		self._get_volume_name = self.ref.method('get_volume_name', '', '(is)')
		self._get_audio_stream = self.ref.method('get_audio_stream', '', '(ii)')
		self._set_audio_stream = self.ref.method('set_audio_stream', 'i', 'i')
		self._get_sub_stream = self.ref.method('get_sub_stream', '', '(ii)')
		self._set_sub_stream = self.ref.method('set_sub_stream', 'ib', 'i')
		self._pause = self.ref.method('pause', 'b', 'i')
		self._set_speed = self.ref.method('set_speed', 'd', 'i')
		self._set_trickmode = self.ref.method('set_trickmode', 'd', 'i')
		self._get_speed = self.ref.method('get_speed', '', '(id)')
		self._get_audio_info = self.ref.method('get_audio_info', 'i', '(iiiiiiiiiiiii)')
		self._get_sub_info = self.ref.method('get_sub_info', 'i', '(iii)')
		self._set_langage = self.ref.method('set_langage', 'iiii', 'i')
		self._select_menu = self.ref.method('select_menu', 'i', 'i')
		self._get_available_stream = self.ref.method('get_available_stream', '', '(iii)')
		self._action_button = self.ref.method('action_button', 'ii', 'i')
		self._get_button_info = self.ref.method('get_button_info', '', '(iiii)')
		self._set_display_mode = self.ref.method('set_display_mode', 'i', 'i')
		self._get_display_mode = self.ref.method('get_display_mode', '', '(ii)')
		self._get_ptt_location = self.ref.method('get_ptt_location', '', '(iiiii)')
		self._get_title_location = self.ref.method('get_title_location', '', '(iiiii)')
		self._get_ptt_duration = self.ref.method('get_ptt_duration', '', '(iiiii)')
		self._get_title_duration = self.ref.method('get_title_duration', '', '(iiiii)')
		self._set_menu_langage = self.ref.method('set_menu_langage', 'i', 'i')
		self._next_chapter = self.ref.method('next_chapter', '', 'i')
		self._previous_chapter = self.ref.method('previous_chapter', '', 'i')
		self._get_player_mode = self.ref.method('get_player_mode', '', '(ii)')
		self._check_menu_available = self.ref.method('check_menu_available', 'i', '(ii)')
		self._resume = self.ref.method('resume', '', 'i')
		self._set_parental_level = self.ref.method('set_parental_level', 'i', 'i')
		self._set_parental_country = self.ref.method('set_parental_country', 'i', 'i')
		self._get_parental_info = self.ref.method('get_parental_info', '', '(iiii)')
		self._time_play = self.ref.method('time_play', 'iiii', 'i')
		self._time_search = self.ref.method('time_search', 'iii', 'i')
		self._set_angle = self.ref.method('set_angle', 'i', 'i')
		self._get_number_of_angle = self.ref.method('get_number_of_angle', 'i', '(ii)')
		self._get_current_angle = self.ref.method('get_current_angle', '', '(ii)')
		self._set_video_output = self.ref.method('set_video_output', 'i', 'i')
		self._is_sub_enabled = self.ref.method('is_sub_enabled', '', '(ii)')
		self._seek_percent = self.ref.method('seek_percent', 'ii', 'i')
		self._set_breakpoint = self.ref.method('set_breakpoint', 'i', 'i')
		self._set_surround = self.ref.method('set_surround', 'i', 'i')
		self.domain = self._domain_type[0]
		self.cur_title = 0
		self.cur_ptt = 0
		self._test = self.ref.method('test', '', 'i')
		return None

	def _wss_management(self, param):
		try:
			change_type = (param & 4278190080L) >> 24
			change_val = param & 16777215
			change_type = self._wss_change_type[change_type]
			if change_type == 'DCAWC_NONE':
				print 'DCAWC_NONE'
			else:
				if change_type == 'DCAWC_COPY_MODE':
					change_val = self._copy_mode[change_val]
				else:
					if change_type == 'DCAWC_COPY_PROTECTION':
						change_val = self._copy_protection[change_val]
					else:
						if change_type == 'DCAWC_ANALOGUE_SOURCE_MODE':
							change_val = self._video_analog_source_mode[change_val]
						else:
							if change_type == 'DCAWC_MPEG_PRESENTATION_MODE':
								change_val = self._display_mode_get[change_val]
							else:
								if change_type == 'DCAWC_WSS_ASPECT_RATIO':
									change_val = self._video_presentation_mode[change_val]
								else:
									if change_type == 'DCAWC_FILM_CAMERA_MODE':
										change_val = self._video_film_camera_mode[change_val]
									else:
										if change_type == 'DCAWC_SUBTITLING_MODE':
											change_val = self._video_sub_mode[change_val]

	def _event_callback(self, type, param):
		event = {}
		event['type'] = self._event_type[type]
		event['param'] = param
		if event['type'] == 'WYDVD_PLAYBACK_MODE_CHANGE':
			try:
				event['param'] = self._player_mode[param]
			except:
				event['param'] = self._player_mode[0]
		else:
			if event['type'] == 'WYDVD_DOMAIN_CHANGE':
				try:
					event['param'] = self._domain_type[param]
					self.domain = self._domain_type[param]
				except:
					event['param'] = self._domain_type[0]
					self.domain = self._domain_type[0]
			else:
				if event['type'] == 'WYDVD_TITLE_CHANGE':
					event['param'] = param
					self.cur_title = param
				else:
					if event['type'] == 'WYDVD_PART_OF_TITLE_CHANGE':
						event['param'] = param
						self.cur_ptt = param
					else:
						if event['type'] == 'WYDVD_DISPLAY_MODE_CHANGE':
							try:
								event['param'] = self._display_mode_get[param]
							except:
								event['param'] = self._display_mode_get[0]
						else:
							if event['type'] == 'WYDVD_VIDEO_STANDARD_CHANGE':
								try:
									event['param'] = self._video_mode_get[param]
								except:
									event['param'] = self._video_mode_get[0]
							else:
								if event['type'] == 'WYDVD_CGMS_APS_WSS_CHANGE':
									event['param'], event['value'] = self._wss_management(param)

	def _ready(self):
		self.ready_event.set()

	def register_callback(self, callback):
		self._client_callback = callback

	def unregister_callback(self):
		self._client_callback = None
		return None

	def stop_wydvd(self):
		self.dbus_thread.stop()
		self.dbus_thread.join()

	def _check_error(self, res):
		if res != 0:
			raise WydvdException('wydvd', self._wydvd_error[res], res)

	def _call(self, func, *args):
		try:
			ret = func(*args)
		except:
			raise WydvdException('call')
		if isinstance(ret, int):
			self._check_error(ret)
		else:
			self._check_error(ret[0])
			return ret[1:]

	def open(self, path=None):
		path = urllib.unquote(path)
		print path
		if not path:
			self._reader = Popen(['wydvd'])
			self._iso = False
		else:
			ss = path.split('://')
			if len(ss) == 1:
				_pre_process = Popen(['ln', '-sf', path, '/dev/loop0'])
			else:
				if ss[0] != 'file':
					raise WydvdException('Unsupported URI type')
				_pre_process = Popen(['ln', '-sf', ss[1], '/dev/loop0'])
			os.waitpid(_pre_process.pid, 0)
			self._reader = Popen(['wydvd', 'iso'])
			self._iso = True
		self.ready_event.wait(15)
		if self.ready_event.isSet():
			self._call(self._open)
			self.ready_event.clear()
		else:
			raise WydvdException('Error Open')

	def close(self):
		os.system('kill ' + str(self._reader.pid))
		os.waitpid(self._reader.pid, 0)

	def start(self):
		self._call(self._open)

	def play(self):
		time.sleep(1)
		self._call(self._play)

	def stop(self):
		self._call(self._stop)

	def play_title(self, title=1):
		try:
			title = int(title)
		except:
			print 'warning : except. parameter are incorrect'
			title = 1
		self._call(self._play_title, title)

	def play_ptt(self, title=1, ptt=1):
		try:
			title = int(title)
			ptt = int(ptt)
		except:
			print 'warning : except. parameter are incorrect'
			title = 1
			ptt = 1
		self._call(self._play_ptt, title, ptt)

	def get_number_of_title(self):
		ret = self._call(self._get_number_of_title)
		return ret[0]

	def get_number_of_ptt(self, title=1):
		try:
			title = int(title)
		except:
			print 'warning : except. parameter are incorrect'
			title = 1
		ret = self._call(self._get_number_of_ptt, title)
		return ret[0]

	def get_volume_name(self):
		ret = self._call(self._get_volume_name)
		return ret[0]

	def pause(self):
		self._call(self._pause, True)

	def unpause(self):
		self._call(self._pause, False)

	def set_speed(self, speed=1):
		try:
			speed = float(speed)
		except:
			print 'warning : except. parameter are incorrect'
			speed = 1
		self._call(self._set_speed, speed)

	def set_trickmode(self, speed=1):
		try:
			speed = float(speed)
		except:
			print 'warnin : except parameter are incorrect'
			speed = 1
		print 'ENTERING TRICK MODE'
		self._call(self._set_trickmode, speed)

	def get_speed(self):
		ret = self._call(self._get_speed)
		return ret[0]

	def get_audio_info(self, audio_stream=0):
		try:
			audio_stream = int(audio_stream)
		except:
			print 'warning : except. parameter are incorrect'
			audio_stream = 0
		ret = self._call(self._get_audio_info, audio_stream)
		info = {}
		if ret[0] != 0:
			info['language'] = chr(ret[0] >> 8) + chr(ret[0] & 255)
		else:
			info['language'] = ''
		if ret[1] != 0:
			info['language_ext'] = chr(ret[1] >> 8) + chr(ret[1] & 255)
		else:
			info['language_ext'] = ''
		if ret[2] < len(self._audio_type):
			info['coding'] = self._audio_type[ret[2]]
		else:
			info['coding'] = 'None'
		info['bitspersample'] = ret[3]
		info['samplespersecond'] = ret[4]
		info['channels'] = ret[5]
		return info

	def get_audio_stream(self):
		ret = self._call(self._get_audio_stream)
		return ret[0]

	def set_audio_stream(self, audio_stream=0):
		try:
			audio_stream = int(audio_stream)
		except:
			print 'warning : except. parameter are incorrect'
			audio_stream = 0
		self._call(self._set_audio_stream, audio_stream)

	def get_sub_stream(self):
		ret = self._call(self._get_sub_stream)
		return ret[0]

	def set_sub_stream(self, sub_stream=0, display=True):
		print 'sub_stream',
		print sub_stream
		print 'display',
		print display
		try:
			sub_stream = int(sub_stream)
			if isinstance(display, str):
				if display.lower() == 'true':
					display = True
				else:
					display = False
			else:
				display = bool(display)
		except Exception, e:
			print 'warning : except. parameter are incorrect :',
			print e
			sub_stream = 0
			display = True
		else:
			pass
		self._call(self._set_sub_stream, sub_stream, display)

	def set_langage(self, audio_lang='en', sub_lang='en'):
		try:
			if isinstance(audio_lang, str) == False:
				audio_lang = 'en'

	def select_menu(self, menu='title'):
		try:
			if isinstance(menu, str) and menu in self._menu_type:
				menu_type = self._menu_type[menu]
			else:
				menu_type = 0

	def get_sub_info(self, sub_stream=0):
		try:
			sub_stream = int(sub_stream)
		except:
			print 'warning : except. parameter are incorrect'
			sub_stream = 0
		ret = self._call(self._get_sub_info, sub_stream)
		info = {}
		if ret[0] != 0:
			info['language'] = chr(ret[0] >> 8) + chr(ret[0] & 255)
		else:
			info['language'] = ''
		return info

	def get_available_stream(self):
		ret = self._call(self._get_available_stream)
		stream = {}
		stream['nb_audio'] = ret[0]
		stream['nb_sub'] = ret[1]
		return stream

	def action_button(self, action='activate', num_button=0):
		print 'action_button ',
		print action
		print 'num_button ',
		print num_button
		try:
			if isinstance(action, str) and action in self._action_type:
				action_type = self._action_type[action]
			else:
				action_type = self._action_type['activate']

	def get_button_info(self):
		ret = self._call(self._get_button_info)
		button = {}
		button['min'] = ret[0]
		button['nb'] = ret[1]
		button['current'] = ret[2]
		return button

	def set_display_mode(self, display_mode='4_3'):
		try:
			if isinstance(display_mode, str) and display_mode in self._display_mode_set:
				display_type = self._display_mode_set[display_mode]
			else:
				display_type = 0

	def get_display_mode(self):
		ret = self._call(self._get_display_mode)
		return self._display_mode_get[ret[0]]

	def get_ptt_location(self):
		ret = self._call(self._get_ptt_location)
		info = {}
		info['num'] = ret[0]
		info['hours'] = ret[1]
		info['minutes'] = ret[2]
		info['seconds'] = ret[3]
		return info

	def get_ptt_duration(self):
		ret = self._call(self._get_ptt_duration)
		info = {}
		info['num'] = ret[0]
		info['hours'] = ret[1]
		info['minutes'] = ret[2]
		info['seconds'] = ret[3]
		return info

	def get_title_location(self):
		ret = self._call(self._get_title_location)
		info = {}
		info['num'] = ret[0]
		info['hours'] = ret[1]
		info['minutes'] = ret[2]
		info['seconds'] = ret[3]
		return info

	def get_title_duration(self):
		ret = self._call(self._get_title_duration)
		info = {}
		info['num'] = ret[0]
		info['hours'] = ret[1]
		info['minutes'] = ret[2]
		info['seconds'] = ret[3]
		return info

	def set_menu_langage(self, menu_lang='en'):
		try:
			if isinstance(menu_lang, str) == False:
				menu_lang = 'en'

	def next_chapter(self):
		self._call(self._next_chapter)

	def previous_chapter(self):
		self._call(self._previous_chapter)

	def get_player_mode(self):
		ret = self._call(self._get_player_mode)
		return self._player_mode[ret[0]]

	def check_menu_available(self, menu='title'):
		try:
			if isinstance(menu, str) and menu in self._menu_type:
				menu_type = self._menu_type[menu]
			else:
				menu_type = 0

	def resume(self):
		self._call(self._resume)

	def set_parental_level(self, level=1):
		try:
			level = int(level)
		except:
			print 'warning : except. parameter are incorrect'
			level = 1
		self._call(self._set_parental_level, level)

	def set_parental_country(self, country=1):
		try:
			country = int(country)
		except:
			print 'warning : except. parameter are incorrect'
			country = 1
		self._call(self._set_parental_country, country)

	def get_parental_info(self):
		ret = self._call(self._get_parental_info)
		info = {}
		info['level'] = ret[0]
		info['country'] = ret[1]
		info['is_parental'] = ret[2]
		return info

	def time_play(self, title=1, hours=0, minutes=0, seconds=0):
		try:
			title = int(title)
			hours = int(hours)
			minutes = int(minutes)
			seconds = int(seconds)
		except:
			print 'warning : except. parameter are incorrect'
			title = 1
			hours = 0
			minutes = 0
			seconds = 0
		self._call(self._time_play, title, hours, minutes, seconds)

	def time_search(self, hours=0, minutes=0, seconds=0):
		try:
			hours = int(hours)
			minutes = int(minutes)
			seconds = int(seconds)
		except:
			print 'warning : except. parameter are incorrect'
			hours = 0
			minutes = 0
			seconds = 0
		self._call(self._time_search, hours, minutes, seconds)

	def set_angle(self, angle=0):
		try:
			angle = int(angle)
		except:
			print 'warning : except. parameter are incorrect'
			angle = 1
		self._call(self._set_angle, angle)

	def get_number_of_angle(self, title=1):
		try:
			title = int(title)
		except:
			print 'warning : except. parameter are incorrect'
			title = 1
		ret = self._call(self._get_number_of_angle, title)
		return ret[0]

	def get_current_angle(self):
		ret = self._call(self._get_current_angle)
		return ret[0]

	def set_video_output(self, video='NONE'):
		try:
			if isinstance(video, str) and video in self._video_mode_set:
				video_mode = self._video_mode_set[video]
			else:
				video_mode = 0

	def is_sub_enabled(self):
		ret = self._call(self._is_sub_enabled)
		return bool(ret[0])

	def seek_percent(self, direction=1):
		try:
			direction = int(direction)
		except:
			print 'warning : except. parameter are incorrect'
			direction = 1
		self._call(self._seek_percent, 10, direction)

	def set_breakpoint(self):
		self._call(self._set_breakpoint)

	_Wydvd__doc_spdif_surround = 'enable or disable sending raw surround data to the SP/DIF output.    \n    if False, send PCM audio data.\n    if True, send raw undecoded audio frames. may be AC3, DTS, or\n    any audio codec supported by an external amplifier connected\n    through SP/DIF or HDMI.\n    '
	def set_surround(self, enable):
		if enable not in (False, True):
			pass
		self._set_surround(int(enable))

	spdif_surround = property(fset=set_surround, doc=_Wydvd__doc_spdif_surround)
	def test(self):
		self._call(self._test)



